diff --git a/README.md b/README.md index d271a445cd37..5fb87f7a9cc1 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa [](https://socialboom.io/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship) [](https://www.mediamister.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship) [](https://www.instant-famous.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship) +[](https://betterfollowers.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index a6268f931aa4..813ea5918b7a 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |companionObject|Whether to generate companion objects in data classes, enabling companion extensions.| |false| |dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**kotlinx-datetime**
kotlinx-datetime (preferred for multiplatform)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', 'original', and 'bestEffortBacktick' (like 'original' but tries to wrap values in backticks before falling back to sanitizing, e.g. `name,asc` stays `name,asc` rather than becoming nameCommaAsc; useful for sort/order enums)| |original| +|enumUnknownDefaultCase|Add an `unknown_default_open_api` enum case as a fallback for unrecognized values. Only `moshi`(serializationLibrary) decodes every unknown value to it: `jackson` skips nullable enums, `kotlinx_serialization` skips non-string enums, and neither `gson`(serializationLibrary) nor `multiplatform`(library) decodes to it at all.|
**false**
No changes to the enums are made, this is the default option.
**true**
Each enum gains an `unknown_default_open_api` case.
|false| |explicitApi|Generates code with explicit access modifiers to comply with Kotlin Explicit API Mode.| |false| |failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false| |generateOneOfAnyOfWrappers|Generate oneOf, anyOf schemas as wrappers. Only `jvm-retrofit2`(library) with `gson` or `kotlinx_serialization`(serializationLibrary) support this option.| |false| diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 57d62a2d6350..d8b11bdbf19f 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -280,6 +280,12 @@ + + com.google.code.gson + gson + 2.10.1 + test + ${swagger-parser-groupid.version} swagger-parser diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 3898d9a9dc88..90b3c8ad9bcf 100755 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -316,6 +316,19 @@ public KotlinClientCodegen() { cliOptions.add(CliOption.newBoolean(USE_RESPONSE_AS_RETURN_TYPE, "When using retrofit2 and coroutines, use `Response`<`T`> as return type instead of `T`.", true)); cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Use Jackson 3 dependencies (tools.jackson package). Requires serializationLibrary=jackson. Incompatible with openApiNullable.")); + + // AbstractKotlinCodegen calls cliOptions.clear(), dropping DefaultCodegen's registration. + // Re-registered on kotlin alone: no other Kotlin generator's templates implement the fallback. + CliOption enumUnknownDefaultCaseOpt = CliOption.newBoolean( + CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, + "Add an `unknown_default_open_api` enum case as a fallback for unrecognized values. Only `moshi`(serializationLibrary) decodes every unknown value to it: `jackson` skips nullable enums, `kotlinx_serialization` skips non-string enums, and neither `gson`(serializationLibrary) nor `multiplatform`(library) decodes to it at all."); + Map enumUnknownDefaultCaseOpts = new HashMap<>(); + enumUnknownDefaultCaseOpts.put("false", + "No changes to the enums are made, this is the default option."); + enumUnknownDefaultCaseOpts.put("true", + "Each enum gains an `unknown_default_open_api` case."); + enumUnknownDefaultCaseOpt.setEnum(enumUnknownDefaultCaseOpts); + cliOptions.add(enumUnknownDefaultCaseOpt); } @Override diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache index 6d1035aae704..d0113c4978a1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/modelInnerEnum.mustache @@ -49,18 +49,18 @@ public static class Adapter extends TypeAdapter<{{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> { @Override public void write(final JsonWriter jsonWriter, final {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} enumeration) throws IOException { - jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}); + jsonWriter.value(enumeration.getValue(){{#isUri}}.toASCIIString(){{/isUri}}{{#isUuid}}.toString(){{/isUuid}}); } @Override public {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} read(final JsonReader jsonReader) throws IOException { - {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}} {{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isFloat}}(float){{/isFloat}} {{#isUuid}}UUID.fromString({{/isUuid}}{{#isUri}}URI.create({{/isUri}}jsonReader.{{#isNumber}}nextString(){{/isNumber}}{{#isInteger}}nextInt(){{/isInteger}}{{#isUri}}nextString()){{/isUri}}{{#isUuid}}nextString()){{/isUuid}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{^isUuid}}{{#isFloat}}nextDouble{{/isFloat}}{{^isFloat}}next{{{dataType}}}{{/isFloat}}(){{/isUuid}}{{/isUri}}{{/isInteger}}{{/isNumber}}; return {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { - {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isUri}}URI.create({{/isUri}}jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{#isUri}}getAsString()){{/isUri}}{{^isNumber}}{{^isInteger}}{{^isUri}}getAs{{{dataType}}}(){{/isUri}}{{/isInteger}}{{/isNumber}}; + {{^isNumber}}{{{dataType}}}{{/isNumber}}{{#isNumber}}String{{/isNumber}} value = {{#isUuid}}UUID.fromString({{/isUuid}}{{#isUri}}URI.create({{/isUri}}jsonElement.{{#isNumber}}getAsString(){{/isNumber}}{{#isInteger}}getAsInt(){{/isInteger}}{{#isUri}}getAsString()){{/isUri}}{{#isUuid}}getAsString()){{/isUuid}}{{^isNumber}}{{^isInteger}}{{^isUri}}{{^isUuid}}getAs{{{dataType}}}(){{/isUuid}}{{/isUri}}{{/isInteger}}{{/isNumber}}; {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.fromValue({{#isNumber}}new BigDecimal({{/isNumber}}value{{#isNumber}}){{/isNumber}}); } } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index eb0f4b50c21c..2e3c78db4fe7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -76,7 +76,7 @@ public class {{classname}} extends BaseApi { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullableArgumentForApi}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { {{#returnType}} return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody(); {{/returnType}} @@ -107,7 +107,7 @@ public class {{classname}} extends BaseApi { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ResponseEntity<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { + public ResponseEntity<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{>nullableArgumentForApi}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache index 53c8ad62704c..6ffd52b4c9f9 100644 --- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache @@ -296,14 +296,14 @@ {{#allVars}} {{#required}} if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) - throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); + throw new JsonException("Property is required for class {{classname}}: {{baseName}}."); {{/required}} {{/allVars}} {{#allVars}} {{^isNullable}} if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet && {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.Value == null) - throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}), "Property is not nullable for class {{classname}}."); + throw new JsonException("Property is not nullable for class {{classname}}: {{baseName}}."); {{/isNullable}} {{/allVars}} diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-operation-handler.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-operation-handler.mustache index ca1a9880e168..4e5c36c6dc06 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-operation-handler.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-operation-handler.mustache @@ -38,6 +38,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -56,6 +57,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -88,11 +90,13 @@ where Ok(param_{{{paramName}}}) => param_{{{paramName}}}, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter {{{baseName}}}: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["{{{baseName}}}"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -121,6 +125,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header {{{baseName}}} - {err}"))) .expect("Unable to create Bad Request response for invalid header {{{baseName}}}")); @@ -130,6 +135,7 @@ where {{#required}} return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required header {{{baseName}}}")) .expect("Unable to create Bad Request response for missing required header {{{baseName}}}")); {{/required}} @@ -171,6 +177,7 @@ where Ok(param_{{{paramName}}}) => Some(param_{{{paramName}}}), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter {{{baseName}}} - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter {{{baseName}}}")), } @@ -182,6 +189,7 @@ where Some(param_{{{paramName}}}) => param_{{{paramName}}}, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter {{{baseName}}}")) .expect("Unable to create Bad Request response for missing query parameter {{{baseName}}}")), }; @@ -204,6 +212,7 @@ where Ok(param_{{{paramName}}}) => Some(param_{{{paramName}}}), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter {{{baseName}}} - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter {{{baseName}}}")), } @@ -215,6 +224,7 @@ where Some(param_{{{paramName}}}) => param_{{{paramName}}}, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter {{{baseName}}}")) .expect("Unable to create Bad Request response for missing query parameter {{{baseName}}}")), }; @@ -318,6 +328,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling {{name}} header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -340,6 +351,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -349,6 +364,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-basic.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-basic.mustache index a0a856623de0..323d2c1f4d1a 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-basic.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-basic.mustache @@ -15,6 +15,7 @@ Ok(param_{{{paramName}}}) => param_{{{paramName}}}, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter {{{baseName}}} - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter {{{baseName}}} due to schema")), } @@ -39,6 +40,7 @@ Ok(param_{{{paramName}}}) => Some(param_{{{paramName}}}), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter {{{baseName}}} - not valid UTF-8: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter {{{baseName}}} due to UTF-8")), } @@ -53,6 +55,7 @@ Some(param_{{{paramName}}}) => param_{{{paramName}}}, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter {{{baseName}}}".to_string())) .expect("Unable to create Bad Request response for missing body parameter {{{baseName}}}")), }; diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-form.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-form.mustache index 79ba09b5ac42..720c789080a8 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-form.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-form.mustache @@ -2,6 +2,7 @@ Some(boundary) => boundary.to_string(), None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Couldn't find valid multipart body".to_string())) .expect("Unable to create Bad Request response for incorrect boundary")), }; @@ -20,30 +21,35 @@ SaveResult::Partial(_, PartialReason::CountLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive parts".to_string())) .expect("Unable to create Bad Request response due to excessive parts")) }, SaveResult::Partial(_, PartialReason::SizeLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive data".to_string())) .expect("Unable to create Bad Request response due to excessive data")) }, SaveResult::Partial(_, PartialReason::Utf8Error(_)) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to invalid data".to_string())) .expect("Unable to create Bad Request response due to invalid data")) }, SaveResult::Partial(_, PartialReason::IoError(_)) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process message part due an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, SaveResult::Error(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process all message parts due to an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, @@ -71,6 +77,7 @@ return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("{{{paramName}}} data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter {{{paramName}}}")) } @@ -87,6 +94,7 @@ return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required form parameter {{{paramName}}}".to_string())) .expect("Unable to create Bad Request due to missing required form parameter {{{paramName}}}")) {{/required}} diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-related.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-related.mustache index 9d72305b32dd..0ebadfbd20e3 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-related.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-request-body-multipart-related.mustache @@ -6,6 +6,7 @@ Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(e.to_string())) .expect("Unable to create Bad Request response due to unable to read content-type header for {{operationId}}")); } @@ -18,6 +19,7 @@ Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Could not read multipart body for {{operationId}}: {e}"))) .expect("Unable to create Bad Request response due to unable to read multipart body for {{operationId}}")); } @@ -43,6 +45,7 @@ Ok(json_data) => json_data, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter {{dataType}} - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter {{dataType}} due to schema")) }; @@ -79,6 +82,7 @@ Some(x) => x, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required multipart/related parameter {{{paramName}}}".to_string())) .expect("Unable to create Bad Request response for missing multipart/related parameter {{{paramName}}} due to schema")) }; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java index f9de3e8af006..f457707d1336 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpClientCodegenTest.java @@ -120,9 +120,9 @@ public void testGenericHostInnerStringEnumUnknownHandlingPreservesNullBehavior() "if (requiredNotnullableEnumStringValue == null)\n" + " throw new JsonException();", "if (!requiredNullableEnumString.IsSet)\n" + - " throw new ArgumentException(\"Property is required for class RequiredClass.\", nameof(requiredNullableEnumString));", + " throw new JsonException(\"Property is required for class RequiredClass: required_nullable_enum_string.\");", "if (!requiredNotnullableEnumString.IsSet)\n" + - " throw new ArgumentException(\"Property is required for class RequiredClass.\", nameof(requiredNotnullableEnumString));" + " throw new JsonException(\"Property is required for class RequiredClass: required_notnullable_enum_string.\");" ); } @@ -469,9 +469,9 @@ public void testNumericEnumJsonConverterUsesNumericOperations() throws IOExcepti // Required numeric checks distinguish a missing property from a present null. assertThat(modelWithEnumProperties).contains( "if (!requiredInlineIntEnum.IsSet)\n" + - " throw new ArgumentException(\"Property is required for class ModelWithEnumProperties.\", nameof(requiredInlineIntEnum));", + " throw new JsonException(\"Property is required for class ModelWithEnumProperties: requiredInlineIntEnum.\");", "if (requiredInlineIntEnum.IsSet && requiredInlineIntEnum.Value == null)\n" + - " throw new ArgumentNullException(nameof(requiredInlineIntEnum), \"Property is not nullable for class ModelWithEnumProperties.\");" + " throw new JsonException(\"Property is not nullable for class ModelWithEnumProperties: requiredInlineIntEnum.\");" ); // Verify long enum uses int64 reader with validation and actual int64 values diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 2b30f532bd71..0c3d059905ef 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -4850,15 +4850,13 @@ public void testJspecify(String library, int springBootVersion, boolean hasJspec "private @Nullable VirusScanEnum virusScan", "FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan)" ); - if (!RESTTEMPLATE.equals(library)) { - JavaFileAssert.assertThat(files.get("FooApi.java")) - .fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"); - JavaFileAssert.assertThat(files.get("FooApi.java")) - .fileContains( - "import org.jspecify.annotations.Nullable;", - "(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)" - ); - } + JavaFileAssert.assertThat(files.get("FooApi.java")) + .fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"); + JavaFileAssert.assertThat(files.get("FooApi.java")) + .fileContains( + "import org.jspecify.annotations.Nullable;", + "(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)" + ); JavaFileAssert.assertThat(files.get("api/package-info.java")) .fileContains("@org.jspecify.annotations.NullMarked"); JavaFileAssert.assertThat(files.get("model/package-info.java")) @@ -4918,15 +4916,13 @@ public void testJspecify_openapiNullable(String library, int springBootVersion, "public Foo(@JsonProperty(JSON_PROPERTY_DT) java.time.@Nullable Instant dt, @JsonProperty(JSON_PROPERTY_NULLABLE_DT) java.time.@Nullable Instant nullableDt, @JsonProperty(JSON_PROPERTY_BINARY) @Nullable File binary, @JsonProperty(JSON_PROPERTY_NULLABLE_BINARY) @Nullable File nullableBinary, @JsonProperty(JSON_PROPERTY_LIST_OF_DT) @Nullable List listOfDt, @JsonProperty(JSON_PROPERTY_LIST_MIN_INTEMS) @Nullable List listMinIntems, @JsonProperty(JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS) @Nullable List nullableListMinIntems, @JsonProperty(JSON_PROPERTY_REQUIRED_DT) java.time.Instant requiredDt, @JsonProperty(JSON_PROPERTY_NUMBER) java.math.@Nullable BigDecimal number, @JsonProperty(JSON_PROPERTY_NULLABLE_NUMBER) java.math.@Nullable BigDecimal nullableNumber, @JsonProperty(JSON_PROPERTY_COLOR) @Nullable String color, @JsonProperty(JSON_PROPERTY_REQUIRED_COLOR) String requiredColor, @JsonProperty(JSON_PROPERTY_NULLABLE_COLOR) @Nullable String nullableColor) {" ); } - if (!RESTTEMPLATE.equals(library)) { - JavaFileAssert.assertThat(files.get("FooApi.java")) - .fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"); - JavaFileAssert.assertThat(files.get("FooApi.java")) - .fileContains( - "import org.jspecify.annotations.Nullable;", - "(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)" - ); - } + JavaFileAssert.assertThat(files.get("FooApi.java")) + .fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"); + JavaFileAssert.assertThat(files.get("FooApi.java")) + .fileContains( + "import org.jspecify.annotations.Nullable;", + "(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)" + ); JavaFileAssert.assertThat(files.get("api/package-info.java")) .fileContains("@org.jspecify.annotations.NullMarked"); JavaFileAssert.assertThat(files.get("model/package-info.java")) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaOkHttpGsonUuidEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaOkHttpGsonUuidEnumTest.java new file mode 100644 index 000000000000..4ca42d4a4497 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaOkHttpGsonUuidEnumTest.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.openapitools.codegen.java; + +import com.github.javaparser.StaticJavaParser; +import com.github.javaparser.ast.body.EnumDeclaration; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonPrimitive; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import javax.tools.ToolProvider; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import static org.openapitools.codegen.TestUtils.newTempFolder; +import static org.testng.Assert.*; + +public class JavaOkHttpGsonUuidEnumTest { + + @DataProvider + public Object[][] caseInsensitiveOptions() { + return new Object[][]{{false}, {true}}; + } + + @Test(dataProvider = "caseInsensitiveOptions") + public void testUuidEnumGsonRoundTrip(boolean caseInsensitive) throws Exception { + Path output = newTempFolder(); + CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary("okhttp-gson") + .setInputSpec("src/test/resources/3_0/issue_20952_inner_enum_comparison.yaml") + .setOutputDir(output.toString()) + .addGlobalProperty("models", "") + .addGlobalProperty("modelDocs", "false") + .addGlobalProperty("modelTests", "false") + .addAdditionalProperty("useEnumCaseInsensitive", caseInsensitive); + File model = new DefaultGenerator().opts(configurator.toClientOptInput()).generate().stream() + .filter(file -> file.getName().equals("Example.java")) + .findFirst().orElseThrow(() -> new AssertionError("Example.java was not generated")); + EnumDeclaration uuidEnum = StaticJavaParser.parse(model).findAll(EnumDeclaration.class).stream() + .filter(declaration -> declaration.getNameAsString().equals("UuidEnum")) + .findFirst().orElseThrow(() -> new AssertionError("UuidEnum was not generated")); + + // Compile the complete generated enum, including its Gson adapter and validation method. + // Only the enclosing model and its unrelated client dependencies are omitted. + Path runtime = Files.createDirectory(output.resolve("runtime")); + Path fixture = runtime.resolve("EnumFixture.java"); + Files.writeString(fixture, "import com.google.gson.*;\n" + + "import com.google.gson.annotations.JsonAdapter;\n" + + "import com.google.gson.stream.*;\n" + + "import java.io.IOException;\n" + + "import java.util.UUID;\n" + + "public class EnumFixture {\n" + uuidEnum + "\n}\n"); + String gsonClasspath = Paths.get(Gson.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString(); + ByteArrayOutputStream diagnostics = new ByteArrayOutputStream(); + assertNotNull(ToolProvider.getSystemJavaCompiler(), "Runtime regression tests require a JDK"); + int result = ToolProvider.getSystemJavaCompiler().run(null, diagnostics, diagnostics, + "-classpath", gsonClasspath, "-d", runtime.toString(), fixture.toString()); + assertEquals(result, 0, diagnostics.toString(StandardCharsets.UTF_8)); + + try (URLClassLoader loader = new URLClassLoader(new URL[]{runtime.toUri().toURL()}, getClass().getClassLoader())) { + Class enumClass = loader.loadClass("EnumFixture$UuidEnum"); + Method validate = enumClass.getMethod("validateJsonElement", JsonElement.class); + Gson gson = new Gson(); + String[] values = { + "123e4567-e89b-12d3-a456-426614174000", + "123e4567-e89b-12d3-a456-426614174001" + }; + Object[] constants = enumClass.getEnumConstants(); + assertEquals(constants.length, values.length); + for (int i = 0; i < values.length; i++) { + String json = "\"" + values[i] + "\""; + assertEquals(gson.toJson(constants[i]), json); + assertSame(gson.fromJson(json, enumClass), constants[i]); + validate.invoke(null, new JsonPrimitive(values[i])); + } + for (String invalid : new String[]{"not-a-uuid", "123e4567-e89b-12d3-a456-426614174002"}) { + expectThrows(IllegalArgumentException.class, + () -> gson.fromJson(new JsonPrimitive(invalid), enumClass)); + InvocationTargetException exception = expectThrows(InvocationTargetException.class, + () -> validate.invoke(null, new JsonPrimitive(invalid))); + assertTrue(exception.getCause() instanceof IllegalArgumentException, + "Validation should reject malformed or unknown UUIDs: " + exception.getCause()); + } + } + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java index 921cd035aeb4..dad52b7ae72b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinClientCodegenModelTest.java @@ -42,6 +42,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import static org.openapitools.codegen.CodegenConstants.*; import static org.openapitools.codegen.languages.KotlinClientCodegen.*; @@ -1505,4 +1506,21 @@ public void testNoDefaultImplWhenNeitherSourceIsSet() throws IOException { Assert.assertTrue(sawJsonTypeInfo, "Expected at least one generated model with @JsonTypeInfo to exercise the code path"); } + + /** + * AbstractKotlinCodegen calls cliOptions.clear(), so an option inherited from DefaultCodegen stays + * functional while vanishing from config-help and docs/generators/kotlin.md. That is how + * enumUnknownDefaultCase went undocumented for years; this guards the re-registration. + */ + @Test + public void testEnumUnknownDefaultCaseIsRegisteredAsCliOption() { + CliOption option = new KotlinClientCodegen().cliOptions().stream() + .filter(o -> CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE.equals(o.getOpt())) + .findFirst() + .orElse(null); + + Assert.assertNotNull(option, CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE + " is not registered"); + Assert.assertEquals(option.getDefault(), "false"); + Assert.assertEquals(option.getEnum().keySet(), Set.of("true", "false")); + } } diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java index d0559756a330..d13fb9805cab 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java @@ -87,7 +87,7 @@ public ResponseEntity testBinaryGifWithHttpInfo() throws RestClientExcepti * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testBodyApplicationOctetstreamBinary(File body) throws RestClientException { + public String testBodyApplicationOctetstreamBinary(@javax.annotation.Nullable File body) throws RestClientException { return testBodyApplicationOctetstreamBinaryWithHttpInfo(body).getBody(); } @@ -99,7 +99,7 @@ public String testBodyApplicationOctetstreamBinary(File body) throws RestClientE * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyApplicationOctetstreamBinaryWithHttpInfo(File body) throws RestClientException { + public ResponseEntity testBodyApplicationOctetstreamBinaryWithHttpInfo(@javax.annotation.Nullable File body) throws RestClientException { Object localVarPostBody = body; @@ -130,7 +130,7 @@ public ResponseEntity testBodyApplicationOctetstreamBinaryWithHttpInfo(F * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testBodyMultipartFormdataArrayOfBinary(List files) throws RestClientException { + public String testBodyMultipartFormdataArrayOfBinary(@javax.annotation.Nonnull List files) throws RestClientException { return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files).getBody(); } @@ -142,7 +142,7 @@ public String testBodyMultipartFormdataArrayOfBinary(List files) throws Re * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(List files) throws RestClientException { + public ResponseEntity testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(@javax.annotation.Nonnull List files) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'files' is set @@ -181,7 +181,7 @@ public ResponseEntity testBodyMultipartFormdataArrayOfBinaryWithHttpInfo * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testBodyMultipartFormdataSingleBinary(File myFile) throws RestClientException { + public String testBodyMultipartFormdataSingleBinary(@javax.annotation.Nullable File myFile) throws RestClientException { return testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile).getBody(); } @@ -193,7 +193,7 @@ public String testBodyMultipartFormdataSingleBinary(File myFile) throws RestClie * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyMultipartFormdataSingleBinaryWithHttpInfo(File myFile) throws RestClientException { + public ResponseEntity testBodyMultipartFormdataSingleBinaryWithHttpInfo(@javax.annotation.Nullable File myFile) throws RestClientException { Object localVarPostBody = null; @@ -227,7 +227,7 @@ public ResponseEntity testBodyMultipartFormdataSingleBinaryWithHttpInfo( * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException { + public Pet testEchoBodyAllOfPet(@javax.annotation.Nullable Pet pet) throws RestClientException { return testEchoBodyAllOfPetWithHttpInfo(pet).getBody(); } @@ -239,7 +239,7 @@ public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity testEchoBodyAllOfPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException { Object localVarPostBody = pet; @@ -270,7 +270,7 @@ public ResponseEntity testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws Rest * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestClientException { + public String testEchoBodyFreeFormObjectResponseString(@javax.annotation.Nullable Object body) throws RestClientException { return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body).getBody(); } @@ -282,7 +282,7 @@ public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestC * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body) throws RestClientException { + public ResponseEntity testEchoBodyFreeFormObjectResponseStringWithHttpInfo(@javax.annotation.Nullable Object body) throws RestClientException { Object localVarPostBody = body; @@ -313,7 +313,7 @@ public ResponseEntity testEchoBodyFreeFormObjectResponseStringWithHttpIn * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet testEchoBodyPet(Pet pet) throws RestClientException { + public Pet testEchoBodyPet(@javax.annotation.Nullable Pet pet) throws RestClientException { return testEchoBodyPetWithHttpInfo(pet).getBody(); } @@ -325,7 +325,7 @@ public Pet testEchoBodyPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity testEchoBodyPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException { Object localVarPostBody = pet; @@ -356,7 +356,7 @@ public ResponseEntity testEchoBodyPetWithHttpInfo(Pet pet) throws RestClien * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testEchoBodyPetResponseString(Pet pet) throws RestClientException { + public String testEchoBodyPetResponseString(@javax.annotation.Nullable Pet pet) throws RestClientException { return testEchoBodyPetResponseStringWithHttpInfo(pet).getBody(); } @@ -368,7 +368,7 @@ public String testEchoBodyPetResponseString(Pet pet) throws RestClientException * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyPetResponseStringWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity testEchoBodyPetResponseStringWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException { Object localVarPostBody = pet; @@ -399,7 +399,7 @@ public ResponseEntity testEchoBodyPetResponseStringWithHttpInfo(Pet pet) * @return StringEnumRef * @throws RestClientException if an error occurs while attempting to invoke the API */ - public StringEnumRef testEchoBodyStringEnum(String body) throws RestClientException { + public StringEnumRef testEchoBodyStringEnum(@javax.annotation.Nullable String body) throws RestClientException { return testEchoBodyStringEnumWithHttpInfo(body).getBody(); } @@ -411,7 +411,7 @@ public StringEnumRef testEchoBodyStringEnum(String body) throws RestClientExcept * @return ResponseEntity<StringEnumRef> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyStringEnumWithHttpInfo(String body) throws RestClientException { + public ResponseEntity testEchoBodyStringEnumWithHttpInfo(@javax.annotation.Nullable String body) throws RestClientException { Object localVarPostBody = body; @@ -442,7 +442,7 @@ public ResponseEntity testEchoBodyStringEnumWithHttpInfo(String b * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testEchoBodyTagResponseString(Tag tag) throws RestClientException { + public String testEchoBodyTagResponseString(@javax.annotation.Nullable Tag tag) throws RestClientException { return testEchoBodyTagResponseStringWithHttpInfo(tag).getBody(); } @@ -454,7 +454,7 @@ public String testEchoBodyTagResponseString(Tag tag) throws RestClientException * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEchoBodyTagResponseStringWithHttpInfo(Tag tag) throws RestClientException { + public ResponseEntity testEchoBodyTagResponseStringWithHttpInfo(@javax.annotation.Nullable Tag tag) throws RestClientException { Object localVarPostBody = tag; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java index 3dd8b83c280c..9767fb439550 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/FormApi.java @@ -47,7 +47,7 @@ public FormApi(ApiClient apiClient) { * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException { + public String testFormIntegerBooleanString(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm) throws RestClientException { return testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm).getBody(); } @@ -61,7 +61,7 @@ public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanF * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testFormIntegerBooleanStringWithHttpInfo(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException { + public ResponseEntity testFormIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerForm, @javax.annotation.Nullable Boolean booleanForm, @javax.annotation.Nullable String stringForm) throws RestClientException { Object localVarPostBody = null; @@ -99,7 +99,7 @@ public ResponseEntity testFormIntegerBooleanStringWithHttpInfo(Integer i * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testFormObjectMultipart(TestFormObjectMultipartRequestMarker marker) throws RestClientException { + public String testFormObjectMultipart(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker) throws RestClientException { return testFormObjectMultipartWithHttpInfo(marker).getBody(); } @@ -111,7 +111,7 @@ public String testFormObjectMultipart(TestFormObjectMultipartRequestMarker marke * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testFormObjectMultipartWithHttpInfo(TestFormObjectMultipartRequestMarker marker) throws RestClientException { + public ResponseEntity testFormObjectMultipartWithHttpInfo(@javax.annotation.Nonnull TestFormObjectMultipartRequestMarker marker) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'marker' is set @@ -155,7 +155,7 @@ public ResponseEntity testFormObjectMultipartWithHttpInfo(TestFormObject * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testFormOneof(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException { + public String testFormOneof(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name) throws RestClientException { return testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name).getBody(); } @@ -172,7 +172,7 @@ public String testFormOneof(String form1, Integer form2, String form3, Boolean f * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testFormOneofWithHttpInfo(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException { + public ResponseEntity testFormOneofWithHttpInfo(@javax.annotation.Nullable String form1, @javax.annotation.Nullable Integer form2, @javax.annotation.Nullable String form3, @javax.annotation.Nullable Boolean form4, @javax.annotation.Nullable Long id, @javax.annotation.Nullable String name) throws RestClientException { Object localVarPostBody = null; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java index 2211c839c8fc..2f322b15622c 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/HeaderApi.java @@ -49,7 +49,7 @@ public HeaderApi(ApiClient apiClient) { * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testHeaderIntegerBooleanStringEnums(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException { + public String testHeaderIntegerBooleanStringEnums(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader) throws RestClientException { return testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader).getBody(); } @@ -65,7 +65,7 @@ public String testHeaderIntegerBooleanStringEnums(Integer integerHeader, Boolean * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testHeaderIntegerBooleanStringEnumsWithHttpInfo(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException { + public ResponseEntity testHeaderIntegerBooleanStringEnumsWithHttpInfo(@javax.annotation.Nullable Integer integerHeader, @javax.annotation.Nullable Boolean booleanHeader, @javax.annotation.Nullable String stringHeader, @javax.annotation.Nullable String enumNonrefStringHeader, @javax.annotation.Nullable StringEnumRef enumRefStringHeader) throws RestClientException { Object localVarPostBody = null; diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java index be5a1fde8c03..5fc7e6d2adc5 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/PathApi.java @@ -48,7 +48,7 @@ public PathApi(ApiClient apiClient) { * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException { + public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath) throws RestClientException { return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath).getBody(); } @@ -63,7 +63,7 @@ public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnu * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException { + public ResponseEntity testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(@javax.annotation.Nonnull String pathString, @javax.annotation.Nonnull Integer pathInteger, @javax.annotation.Nonnull String enumNonrefStringPath, @javax.annotation.Nonnull StringEnumRef enumRefStringPath) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'pathString' is set diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java index 38d533ff3628..5aab48f7a27f 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/QueryApi.java @@ -52,7 +52,7 @@ public QueryApi(ApiClient apiClient) { * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testEnumRefString(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException { + public String testEnumRefString(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery) throws RestClientException { return testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery).getBody(); } @@ -65,7 +65,7 @@ public String testEnumRefString(String enumNonrefStringQuery, StringEnumRef enum * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEnumRefStringWithHttpInfo(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException { + public ResponseEntity testEnumRefStringWithHttpInfo(@javax.annotation.Nullable String enumNonrefStringQuery, @javax.annotation.Nullable StringEnumRef enumRefStringQuery) throws RestClientException { Object localVarPostBody = null; @@ -100,7 +100,7 @@ public ResponseEntity testEnumRefStringWithHttpInfo(String enumNonrefStr * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException { + public String testQueryDatetimeDateString(@javax.annotation.Nullable OffsetDateTime datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery) throws RestClientException { return testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery).getBody(); } @@ -114,7 +114,7 @@ public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDat * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryDatetimeDateStringWithHttpInfo(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException { + public ResponseEntity testQueryDatetimeDateStringWithHttpInfo(@javax.annotation.Nullable OffsetDateTime datetimeQuery, @javax.annotation.Nullable LocalDate dateQuery, @javax.annotation.Nullable String stringQuery) throws RestClientException { Object localVarPostBody = null; @@ -150,7 +150,7 @@ public ResponseEntity testQueryDatetimeDateStringWithHttpInfo(OffsetDate * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException { + public String testQueryIntegerBooleanString(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery) throws RestClientException { return testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery).getBody(); } @@ -164,7 +164,7 @@ public String testQueryIntegerBooleanString(Integer integerQuery, Boolean boolea * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryIntegerBooleanStringWithHttpInfo(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException { + public ResponseEntity testQueryIntegerBooleanStringWithHttpInfo(@javax.annotation.Nullable Integer integerQuery, @javax.annotation.Nullable Boolean booleanQuery, @javax.annotation.Nullable String stringQuery) throws RestClientException { Object localVarPostBody = null; @@ -198,7 +198,7 @@ public ResponseEntity testQueryIntegerBooleanStringWithHttpInfo(Integer * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws RestClientException { + public String testQueryStyleDeepObjectExplodeTrueObject(@javax.annotation.Nullable Pet queryObject) throws RestClientException { return testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject).getBody(); } @@ -210,7 +210,7 @@ public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException { + public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject) throws RestClientException { Object localVarPostBody = null; @@ -249,7 +249,7 @@ public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectWithHttpI * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { + public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { return testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody(); } @@ -261,7 +261,7 @@ public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepO * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { + public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException { Object localVarPostBody = null; @@ -293,7 +293,7 @@ public ResponseEntity testQueryStyleDeepObjectExplodeTrueObjectAllOfWith * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleFormExplodeFalseArrayInteger(List queryObject) throws RestClientException { + public String testQueryStyleFormExplodeFalseArrayInteger(@javax.annotation.Nullable List queryObject) throws RestClientException { return testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(queryObject).getBody(); } @@ -305,7 +305,7 @@ public String testQueryStyleFormExplodeFalseArrayInteger(List queryObje * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(List queryObject) throws RestClientException { + public ResponseEntity testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(@javax.annotation.Nullable List queryObject) throws RestClientException { Object localVarPostBody = null; @@ -337,7 +337,7 @@ public ResponseEntity testQueryStyleFormExplodeFalseArrayIntegerWithHttp * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleFormExplodeFalseArrayString(List queryObject) throws RestClientException { + public String testQueryStyleFormExplodeFalseArrayString(@javax.annotation.Nullable List queryObject) throws RestClientException { return testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(queryObject).getBody(); } @@ -349,7 +349,7 @@ public String testQueryStyleFormExplodeFalseArrayString(List queryObject * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(List queryObject) throws RestClientException { + public ResponseEntity testQueryStyleFormExplodeFalseArrayStringWithHttpInfo(@javax.annotation.Nullable List queryObject) throws RestClientException { Object localVarPostBody = null; @@ -381,7 +381,7 @@ public ResponseEntity testQueryStyleFormExplodeFalseArrayStringWithHttpI * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { + public String testQueryStyleFormExplodeTrueArrayString(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { return testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject).getBody(); } @@ -393,7 +393,7 @@ public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplode * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { + public ResponseEntity testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(@javax.annotation.Nullable TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException { Object localVarPostBody = null; @@ -427,7 +427,7 @@ public ResponseEntity testQueryStyleFormExplodeTrueArrayStringWithHttpIn * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws RestClientException { + public String testQueryStyleFormExplodeTrueObject(@javax.annotation.Nullable Pet queryObject) throws RestClientException { return testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject).getBody(); } @@ -439,7 +439,7 @@ public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws RestCl * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException { + public ResponseEntity testQueryStyleFormExplodeTrueObjectWithHttpInfo(@javax.annotation.Nullable Pet queryObject) throws RestClientException { Object localVarPostBody = null; @@ -478,7 +478,7 @@ public ResponseEntity testQueryStyleFormExplodeTrueObjectWithHttpInfo(Pe * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws RestClientException { + public String testQueryStyleFormExplodeTrueObjectAllOf(@javax.annotation.Nullable DataQuery queryObject) throws RestClientException { return testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody(); } @@ -490,7 +490,7 @@ public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) th * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery queryObject) throws RestClientException { + public ResponseEntity testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(@javax.annotation.Nullable DataQuery queryObject) throws RestClientException { Object localVarPostBody = null; @@ -523,7 +523,7 @@ public ResponseEntity testQueryStyleFormExplodeTrueObjectAllOfWithHttpIn * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String testQueryStyleJsonSerializationObject(Pet jsonSerializedObjectRefStringQuery, List jsonSerializedObjectArrayRefStringQuery) throws RestClientException { + public String testQueryStyleJsonSerializationObject(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List jsonSerializedObjectArrayRefStringQuery) throws RestClientException { return testQueryStyleJsonSerializationObjectWithHttpInfo(jsonSerializedObjectRefStringQuery, jsonSerializedObjectArrayRefStringQuery).getBody(); } @@ -536,7 +536,7 @@ public String testQueryStyleJsonSerializationObject(Pet jsonSerializedObjectRefS * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryStyleJsonSerializationObjectWithHttpInfo(Pet jsonSerializedObjectRefStringQuery, List jsonSerializedObjectArrayRefStringQuery) throws RestClientException { + public ResponseEntity testQueryStyleJsonSerializationObjectWithHttpInfo(@javax.annotation.Nullable Pet jsonSerializedObjectRefStringQuery, @javax.annotation.Nullable List jsonSerializedObjectArrayRefStringQuery) throws RestClientException { Object localVarPostBody = null; diff --git a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java index 20aeeb76bf62..74ece709fcdb 100644 --- a/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/others/java/resttemplate-list-schema-validation/src/main/java/org/openapitools/client/api/UserApi.java @@ -48,7 +48,7 @@ public UserApi(ApiClient apiClient) { * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User userGet(List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException { + public User userGet(@javax.annotation.Nonnull List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException { return userGetWithHttpInfo(username).getBody(); } @@ -60,7 +60,7 @@ public User userGet(List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) thr * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity userGetWithHttpInfo(List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException { + public ResponseEntity userGetWithHttpInfo(@javax.annotation.Nonnull List<@Pattern(regexp = "^[a-zA-Z0-9]$")String> username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef.cs index afc16caa901c..ae8b5c31618b 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef.cs @@ -139,7 +139,7 @@ public override OneOfNullAndRef Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class OneOfNullAndRef."); + throw new JsonException("Property is not nullable for class OneOfNullAndRef: number."); return new OneOfNullAndRef(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef2.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef2.cs index b93625d3a510..2cb4cd181707 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef2.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef2.cs @@ -139,7 +139,7 @@ public override OneOfNullAndRef2 Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class OneOfNullAndRef2."); + throw new JsonException("Property is not nullable for class OneOfNullAndRef2: number."); return new OneOfNullAndRef2(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef3.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef3.cs index 9ade8f157f5a..c130f2ec24d5 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef3.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/OneOfNullAndRef3.cs @@ -139,7 +139,7 @@ public override OneOfNullAndRef3 Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class OneOfNullAndRef3."); + throw new JsonException("Property is not nullable for class OneOfNullAndRef3: number."); return new OneOfNullAndRef3(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/Parent.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/Parent.cs index d2fd6566d8f4..24712d2aabf4 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/Parent.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/Parent.cs @@ -139,7 +139,7 @@ public override Parent Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class Parent."); + throw new JsonException("Property is not nullable for class Parent: number."); return new Parent(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithOneOfProperty.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithOneOfProperty.cs index af064bac4e56..0dc1c0a0f8c7 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithOneOfProperty.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithOneOfProperty.cs @@ -139,7 +139,7 @@ public override ParentWithOneOfProperty Read(ref Utf8JsonReader utf8JsonReader, } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class ParentWithOneOfProperty."); + throw new JsonException("Property is not nullable for class ParentWithOneOfProperty: number."); return new ParentWithOneOfProperty(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs index 5dfece8a6d02..8efa0a38f470 100644 --- a/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs +++ b/samples/client/petstore/csharp/generichost/latest/AnnotatedEnum/src/Org.OpenAPITools/Model/ParentWithPluralOneOfProperty.cs @@ -139,7 +139,7 @@ public override ParentWithPluralOneOfProperty Read(ref Utf8JsonReader utf8JsonRe } if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class ParentWithPluralOneOfProperty."); + throw new JsonException("Property is not nullable for class ParentWithPluralOneOfProperty: number."); return new ParentWithPluralOneOfProperty(number); } diff --git a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Model/HelloWorldPostRequest.cs b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Model/HelloWorldPostRequest.cs index 83136644b5e5..090cd71ce295 100644 --- a/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Model/HelloWorldPostRequest.cs +++ b/samples/client/petstore/csharp/generichost/latest/HelloWorld/src/Org.OpenAPITools/Model/HelloWorldPostRequest.cs @@ -139,7 +139,7 @@ public override HelloWorldPostRequest Read(ref Utf8JsonReader utf8JsonReader, Ty } if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class HelloWorldPostRequest."); + throw new JsonException("Property is not nullable for class HelloWorldPostRequest: message."); return new HelloWorldPostRequest(message); } diff --git a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/Foo.cs index f584d270555a..c608ecd1f340 100644 --- a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/Foo.cs @@ -139,7 +139,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/IconsDefaultResponse.cs b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/IconsDefaultResponse.cs index 46fd8d0a3dd3..5a4ec01675d2 100644 --- a/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/IconsDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/latest/InlineEnumAnyOf/src/Org.OpenAPITools/Model/IconsDefaultResponse.cs @@ -139,7 +139,7 @@ public override IconsDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Typ } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class IconsDefaultResponse."); + throw new JsonException("Property is not nullable for class IconsDefaultResponse: string."); return new IconsDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Color.cs b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Color.cs index 392bf310549c..5c5481748c60 100644 --- a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Color.cs +++ b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Color.cs @@ -215,13 +215,13 @@ public override Color Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (b.IsSet && b.Value == null) - throw new ArgumentNullException(nameof(b), "Property is not nullable for class Color."); + throw new JsonException("Property is not nullable for class Color: b."); if (g.IsSet && g.Value == null) - throw new ArgumentNullException(nameof(g), "Property is not nullable for class Color."); + throw new JsonException("Property is not nullable for class Color: g."); if (r.IsSet && r.Value == null) - throw new ArgumentNullException(nameof(r), "Property is not nullable for class Color."); + throw new JsonException("Property is not nullable for class Color: r."); return new Color(b, g, r); } diff --git a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/NullTypeDirect.cs b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/NullTypeDirect.cs index cb668927b471..cd7da7e755d1 100644 --- a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/NullTypeDirect.cs +++ b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/NullTypeDirect.cs @@ -160,7 +160,7 @@ public override NullTypeDirect Read(ref Utf8JsonReader utf8JsonReader, Type type } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class NullTypeDirect."); + throw new JsonException("Property is not nullable for class NullTypeDirect: id."); return new NullTypeDirect(alwaysNull, id); } diff --git a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Shape.cs index 877158311288..a4afaf924135 100644 --- a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Shape.cs @@ -154,13 +154,13 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: area."); return new Shape(shapeType.Value!, area); } diff --git a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 9fc58e50b835..e5fe4baf0ce6 100644 --- a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -154,13 +154,13 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: area."); return new ShapeOrNull(shapeType.Value!, area); } diff --git a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Widget.cs b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Widget.cs index d212692286b3..70480fd89109 100644 --- a/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Widget.cs +++ b/samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/Widget.cs @@ -210,16 +210,16 @@ public override Widget Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!id.IsSet) - throw new ArgumentException("Property is required for class Widget.", nameof(id)); + throw new JsonException("Property is required for class Widget: id."); if (!name.IsSet) - throw new ArgumentException("Property is required for class Widget.", nameof(name)); + throw new JsonException("Property is required for class Widget: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Widget."); + throw new JsonException("Property is not nullable for class Widget: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Widget."); + throw new JsonException("Property is not nullable for class Widget: name."); return new Widget(id.Value!.Value!, name.Value!, color, debugInfo, shape); } diff --git a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/TestObject.cs b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/TestObject.cs index 49c748d7fb39..6aee702783fc 100644 --- a/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/TestObject.cs +++ b/samples/client/petstore/csharp/generichost/latest/OneOfList/src/Org.OpenAPITools/Model/TestObject.cs @@ -139,7 +139,7 @@ public override TestObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class TestObject."); + throw new JsonException("Property is not nullable for class TestObject: name."); return new TestObject(name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Activity.cs index 27267a89b539..e84a4cec971f 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Activity.cs @@ -139,7 +139,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 003514970fcc..a658af0bd23b 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -159,10 +159,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 03a63cf9238e..978164d87a35 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -280,25 +280,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Animal.cs index e9fd3ed17925..18af25619588 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Animal.cs @@ -169,13 +169,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ApiResponse.cs index 2d955bed2864..d7ffff1db1f0 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -179,13 +179,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Apple.cs index 8aba169c7737..243207b6c140 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Apple.cs @@ -209,13 +209,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AppleReq.cs index 7ede1db8aae9..3963c3509d22 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/AppleReq.cs @@ -152,13 +152,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index c5d0c0120cb6..a18bbc8f63b9 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -139,7 +139,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 37e33d235abf..8a78454bd7f4 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -139,7 +139,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayTest.cs index d28d7086029c..046bb9f5f789 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -179,13 +179,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Banana.cs index ee06386ed18c..2096e64bf261 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Banana.cs @@ -139,7 +139,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BananaReq.cs index 94e303e4efb5..7888e750f399 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BananaReq.cs @@ -152,13 +152,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BasquePig.cs index abd455115d64..f8aec378b456 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/BasquePig.cs @@ -132,10 +132,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Capitalization.cs index 41f67b976b5f..a7ffcbe7c972 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Capitalization.cs @@ -240,22 +240,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Cat.cs index 274069876c4a..a51482b1f721 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Cat.cs @@ -139,16 +139,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Category.cs index ef51987c7c78..26190452c0eb 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Category.cs @@ -152,13 +152,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ChildCat.cs index aef73addc4cb..758438f488b8 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ChildCat.cs @@ -201,13 +201,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ClassModel.cs index f87938353430..78874e41333a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ClassModel.cs @@ -139,7 +139,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 9afab7e4e027..b1995acbd852 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -145,16 +145,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/CopyActivity.cs index 69523975f71e..2ad46f9529a1 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -194,16 +194,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DanishPig.cs index ffcd3973301e..a3462f9eb6bb 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DanishPig.cs @@ -132,10 +132,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DateOnlyClass.cs index e40843855a80..1ba89c4b0f23 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -145,7 +145,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DeprecatedObject.cs index f2fa0117113b..a5bf2bd1380b 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -139,7 +139,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant1.cs index 3113069aea3a..65e39f8e4577 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant1.cs @@ -139,22 +139,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant2.cs index 62f9a8ffa5e0..42eda046d03f 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Descendant2.cs @@ -139,22 +139,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Dog.cs index 4fa08c7e3d5e..3737377345b7 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Dog.cs @@ -139,16 +139,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Drawing.cs index 450a44bf35b2..b1d3b2c1fb15 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Drawing.cs @@ -206,10 +206,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EntityBase.cs index 6e6b3d5e866f..73c73cc8a7b6 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EntityBase.cs @@ -146,10 +146,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumArrays.cs index 496fd8e72f03..f29bed6faf30 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -298,10 +298,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumTest.cs index 52b718fd0fcb..2a2fd0864702 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EnumTest.cs @@ -816,31 +816,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 7291b85426f3..8cc7d8fd5997 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -145,16 +145,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/File.cs index 09cd9b5bf640..1b9107bcbcde 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/File.cs @@ -140,7 +140,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 87b218a512cc..d7ecd89a060b 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -159,10 +159,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Foo.cs index f584d270555a..c608ecd1f340 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Foo.cs @@ -139,7 +139,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index a232f90cafd4..a51857dcf9bf 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -139,7 +139,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FormatTest.cs index 899c764ca96f..f2a74bad58f6 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/FormatTest.cs @@ -820,103 +820,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Fruit.cs index 89a1ee84e622..8c210eaa800a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Fruit.cs @@ -184,7 +184,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GmFruit.cs index ab33328b55dd..f0d6a5b664e9 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GmFruit.cs @@ -188,7 +188,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index c0369d585670..64f803eec3f5 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -149,10 +149,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index b10b320ea8e0..46eddf6866b8 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -159,10 +159,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 9cde7d5b8f89..a16b6b4c9074 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -239,22 +239,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 80aef9813347..55832290c40a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -145,16 +145,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/List.cs index 9e7b530c64a1..ca168a960df0 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/List.cs @@ -139,7 +139,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 760943a4edef..9acb4b7fdcef 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -159,10 +159,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Mammal.cs index d6fc69bec830..987fbb3d830e 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Mammal.cs @@ -208,10 +208,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MapTest.cs index ccbba4ceeae3..76558010d3a4 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MapTest.cs @@ -265,16 +265,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 5eb5ee1c3d2d..0dbf29842d9a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -139,7 +139,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedOneOf.cs index 7d90d152a794..c4b8905e427e 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -139,7 +139,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 68918f31043d..6e557faf5401 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -211,16 +211,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedSubId.cs index 7b00310a46f1..a2ef341e5f53 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -139,7 +139,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Model200Response.cs index ddb067055bee..d93c8bedfe26 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Model200Response.cs @@ -159,10 +159,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ModelClient.cs index aa47d610cb2c..aeb95f31d502 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ModelClient.cs @@ -139,7 +139,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Name.cs index b597041faf5f..5f9a8fb3a3de 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Name.cs @@ -192,19 +192,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 968636eb694f..e51f5d59cff3 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -145,16 +145,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableClass.cs index c9631230e6ac..92c4cbdb69a0 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableClass.cs @@ -376,10 +376,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableShape.cs index c40ca112913f..80dfdb987f4e 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NullableShape.cs @@ -187,10 +187,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NumberOnly.cs index 2d5b1da808c7..6843ae36df0a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -139,7 +139,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d12f94ab19b1..1c9a5883e7ec 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -202,16 +202,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Order.cs index 0c163e7f8f9a..e8d9f865d7f5 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Order.cs @@ -334,22 +334,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/OuterComposite.cs index 29073f0450ad..d532a9b42b5d 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -179,13 +179,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ParentPet.cs index 9ddabc0feba4..4322d5454caf 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ParentPet.cs @@ -119,10 +119,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pet.cs index 6f040eb931cd..8ad5fd76b994 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pet.cs @@ -315,28 +315,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pig.cs index 211913e79f86..7df9ca72ec33 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Pig.cs @@ -187,10 +187,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Quadrilateral.cs index 51ee648ea804..3f316b8da34f 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -187,10 +187,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 4aaf0d1665fb..7b6bcfb175ae 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -132,10 +132,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index d6a361257e44..9cda6a9aad2c 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -159,10 +159,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RequiredClass.cs index e5db62fc1ee8..d4d7e59418ef 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2071,136 +2071,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Result.cs index c766fe3ca280..1c4aeaa55c9b 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Result.cs @@ -182,13 +182,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Return.cs index 464879e9f26c..2ff7d5b30387 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Return.cs @@ -185,19 +185,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 469134c26bde..32a28716035a 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -159,10 +159,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index a906d0f6d0dd..6ab0e07a21b0 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -139,7 +139,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index c732bc01a5ad..5023798cda25 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -145,16 +145,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Shape.cs index 4cc43358e2c0..d1be81de0d92 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Shape.cs @@ -187,10 +187,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeInterface.cs index f9441871bb4f..20eac6a7a03f 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -132,10 +132,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeOrNull.cs index b1be624931b2..2585a167c265 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -187,10 +187,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index d3bc2dfb85b3..4292f02570cf 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -145,16 +145,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SpecialModelName.cs index 98289ad7a6e6..a7259ffb794b 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -159,10 +159,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Tag.cs index 34992e8815bb..cfd7e9543b5f 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Tag.cs @@ -159,10 +159,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index c6dd3fd660ca..b18051653715 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -139,7 +139,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index a6979a10b1c9..fa64236bf974 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -139,7 +139,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestDescendants.cs index 4da09fa5643c..765c44a4a4e1 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -235,16 +235,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 7d85da50aa83..ebe745fa5373 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -146,7 +146,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestResult.cs index b89dacf27aa0..a8361493c62d 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TestResult.cs @@ -181,13 +181,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Triangle.cs index 3c128abf074f..a98796b39e95 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Triangle.cs @@ -208,10 +208,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TriangleInterface.cs index 5ba7f95069db..f8aa93f3012d 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -132,10 +132,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/User.cs index b3c25d6eae7d..a9ced5df860e 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/User.cs @@ -364,31 +364,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Whale.cs index c4e8f3daa18d..6f93eb244067 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Whale.cs @@ -172,16 +172,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Zebra.cs index 3c1a11d437d7..4e7b7e47af90 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/Zebra.cs @@ -246,13 +246,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index a81ccef21b06..7d9d604bc7f7 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -212,7 +212,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 4213420714a8..e39d6528c83e 100644 --- a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -145,16 +145,16 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: children."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: $_type."); return new Adult(children, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Child.cs index f71f244652dc..ca9e960e944e 100644 --- a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -165,19 +165,19 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: age."); if (boosterSeat.IsSet && boosterSeat.Value == null) - throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: boosterSeat."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: $_type."); return new Child(age, boosterSeat, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Person.cs index e65419a3b600..59df30ef628a 100644 --- a/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net10/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -197,13 +197,13 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: $_type."); return new Person(firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs index 9ccac387b196..70eeaef7e581 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -196,7 +196,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs index ba2d70c2fab5..2f7c7293e846 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs @@ -146,7 +146,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs index 7b0cc8bc8756..df0d290f06ee 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs @@ -146,7 +146,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs index c7ad4a614836..f3a5418e2170 100644 --- a/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs @@ -195,7 +195,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs index 46fc753b3481..0d9b46a978e5 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs @@ -141,13 +141,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs index 8d25c498e494..4fb582c6484a 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -134,16 +134,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs index 5b8587c218e1..7726e8d5c4c2 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs @@ -131,22 +131,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs index 82cc312ea062..bb2711891d54 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs @@ -131,22 +131,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs index ee70392a1686..79d09774978a 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -165,10 +165,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 780950460e89..02a65dd082b3 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -298,31 +298,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 2f37dd2a61d9..38948d0c1ed3 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MapTest.cs index 463b714170dd..6e40d4275163 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MapTest.cs @@ -205,16 +205,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Order.cs index 66edef8216f7..32ecad789af6 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Order.cs @@ -251,22 +251,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pet.cs index f60a0987b590..bad8f48861c7 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pet.cs @@ -232,28 +232,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs index eeda5ef0fcc7..2007d33c8f9b 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -895,136 +895,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs index c5b9db5913dd..16abb0fa533d 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -168,16 +168,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Zebra.cs index 67b6d90eb1d7..69ee715e38be 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/Zebra.cs @@ -158,13 +158,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index ad7eadb1b479..ee7e3eecf739 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -145,7 +145,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs index d43c6780ca28..ca8cfb1a062d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs @@ -147,7 +147,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 23f5c4b3a85d..4cb0bfbebdc6 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -167,10 +167,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index ad641f68f2e9..9e6732bcbc10 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -288,25 +288,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs index 6344d530cd6e..457d433df3bb 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs @@ -177,13 +177,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs index 70585c8acf5b..eae8aa1c7bfd 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -187,13 +187,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs index edd6e65f1f41..9627141cf147 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs @@ -217,13 +217,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs index a98f5bd8787f..f21dcb8014b1 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs @@ -153,13 +153,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 509645c3f350..522624a5ce1d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9d5c27336962..67bbfe87647d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs index 14d7950c4b6f..a01ecacdd72b 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -187,13 +187,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs index 0a7d794e23fc..ca7e413ceeb6 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs index 1973db4c4bed..96a98e9e2f69 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs @@ -153,13 +153,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs index 8dbfb7552b5f..001ce4a14655 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs @@ -140,10 +140,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs index 68e8220438eb..85b6baa2d754 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs @@ -248,22 +248,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs index 0f47bd35e784..05ee372584c4 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs @@ -140,16 +140,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs index d411efbb83bd..63a943b1ca32 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs @@ -160,13 +160,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs index d7c5a4cd96ec..506651c5b421 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs @@ -202,13 +202,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs index 16551511b256..ba22c38d013f 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs @@ -147,7 +147,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index e1e504b538e1..bda6577d02c2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -153,16 +153,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs index 260d78873e2e..1b77996e10c2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -195,16 +195,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs index ed6bc6534338..fb8adbaeb62f 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs @@ -140,10 +140,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f39aa601716f..bde9eedbf899 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -153,7 +153,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5e4782e9741b..edf3580a5006 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -147,7 +147,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs index 68a2f65c9aff..d0913992d157 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs @@ -140,22 +140,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs index 5a130166a0b1..5cd06903b366 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs @@ -140,22 +140,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs index b8435f95759c..d138df0d6905 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs @@ -140,16 +140,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs index cce96329e588..678e0ed5419d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs @@ -207,10 +207,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs index a81af5d8181b..4c21cc792a55 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs @@ -154,10 +154,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs index 05f5e7db1d24..087a026beaaf 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -306,10 +306,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs index 62c8f51ce807..2eefc1ef6ba2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs @@ -824,31 +824,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 407e33a7b6f5..c30ec912d755 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -153,16 +153,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs index 6608c8f2c0e0..d5eb5d549ea6 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs @@ -148,7 +148,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index d8837421dcac..7e388fa26fa2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -167,10 +167,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs index 4b75918a83d5..f410f110f43c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs @@ -147,7 +147,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index baa4b149818a..cfc038f14e58 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -147,7 +147,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 1badd1c0d948..3c0a18995dc9 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -828,103 +828,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs index f902f78034c4..363808c467e3 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs @@ -185,7 +185,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs index 1eccb13e9003..57ccb03380ab 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs @@ -189,7 +189,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 4477d4279465..b5365a68d6ba 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -157,10 +157,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 1a446ca46e5a..103d547b76d2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -208,10 +208,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 82b78a3e00f9..fc3ff4a253e9 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -294,22 +294,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index b211cf0586b1..466c62aea797 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -146,16 +146,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs index b8a8a257d0d2..51f16d706697 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs @@ -147,7 +147,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 70963bef2fc5..91d2b5fb1c3c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -167,10 +167,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs index fc906f76d9ff..05a5e5d55604 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs @@ -216,10 +216,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs index 64474ff0d16d..c232c64f65da 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs @@ -273,16 +273,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 48eca2b1e0b8..f5f988259cdf 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -147,7 +147,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs index e5c9f6f2f2f7..03581cdcfd40 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -147,7 +147,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1cef2917ba78..840ed7657912 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -219,16 +219,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs index 77c1611f8f80..b385cf0dd9ee 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -147,7 +147,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs index ff4080153aea..bf0f3e968c36 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs @@ -167,10 +167,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs index b32d7f964146..4b654356987a 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs @@ -147,7 +147,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs index 8fd568be1a6b..73f861dcc6cc 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs @@ -241,19 +241,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 10c8125b1068..c8a57aa7547f 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -153,16 +153,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs index d1327d7b480f..96cbd8c1fcca 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs @@ -377,10 +377,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs index b257d25ab62f..f8120a285900 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs @@ -195,10 +195,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs index a463ed4572d3..25105240d38d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -147,7 +147,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 03727598207c..5b4319dbc5ef 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -210,16 +210,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs index ee4d0c85d40a..52073abb4d53 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs @@ -342,22 +342,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs index 686aa2d77797..fe4f0786dbaf 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -187,13 +187,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs index 70e91c22627e..8d83f726bb64 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs @@ -120,10 +120,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs index 5c16160c5db9..84a01f8eeae3 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs @@ -323,28 +323,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs index 217360908bd8..fa25f86f0451 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs @@ -195,10 +195,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs index 258df7403653..f3ef0fda6d96 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -195,10 +195,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index bbd3a56b31ed..56c9dfeac6ba 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -140,10 +140,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 3b1999efb42d..72ccb4531a7d 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -205,10 +205,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs index 1912f3c24ebf..186dfc468ead 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2079,136 +2079,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs index a6bef2efe103..fe06dd89d4c9 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs @@ -190,13 +190,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs index fd9446247331..12c679cd5146 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs @@ -193,19 +193,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs index ac6dd43ef0b2..056240574ca5 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -167,10 +167,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 55d774689f49..264d24e0505b 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -147,7 +147,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index f1779050584b..fd0f1d1bcba9 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -153,16 +153,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs index 22f37a48e620..9946323dcdbe 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs @@ -195,10 +195,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs index cb375197e488..4404aab7f1b1 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -140,10 +140,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 4df1e6983ad1..665942a5f44f 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -195,10 +195,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 0034604725d0..c0ba8c4782be 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -153,16 +153,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs index 81c58c98aa68..026f410268fe 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -167,10 +167,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs index a16ea726bfff..0702b6e968f2 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs @@ -167,10 +167,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 182412d38e32..61b664997f85 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 97b4b270f1c9..54b592a8f5a4 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs index 5b568b36e9ec..e75e8fbaeb7c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -243,16 +243,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 07d98ed51393..3e8d19707387 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -147,7 +147,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs index d168aff8b9c2..f8a9abc06052 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs @@ -189,13 +189,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs index 0be5259f1ebe..c3d21195968a 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs @@ -216,10 +216,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs index c97244ab95ff..358a0e2aa20c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -140,10 +140,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs index c6a4d2cddb86..ce498d7d327c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs @@ -372,31 +372,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs index 74e3afd8dbf8..d0099756b15c 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs @@ -180,16 +180,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs index f6faea2fd5ed..fae5958200e6 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs @@ -247,13 +247,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 796310e1783f..cf5d2bcb6a8f 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -220,7 +220,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Fruit.cs index af45459bafc7..995c0a87ad8b 100644 --- a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -213,7 +213,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Orange.cs b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Orange.cs index 793f5553239f..eea08050f18f 100644 --- a/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Orange.cs +++ b/samples/client/petstore/csharp/generichost/net10/OneOf/src/Org.OpenAPITools/Model/Orange.cs @@ -147,7 +147,7 @@ public override Orange Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class Orange."); + throw new JsonException("Property is not nullable for class Orange: sweet."); return new Orange(sweet); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index d5e2a907d867..fa6b06132a0c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 231e6fbbf6bc..11f9cab173bd 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0aaa3e6fe0aa..bd7ccf486fc3 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4703397c61b3..1644c179c75b 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index b5cdc783088c..831d190dfa8d 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Order.cs index d3f99122b153..f678fe600e84 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 6d3d8121e68c..599d7d612422 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 50d69fccab91..779f1eb4f318 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 8bd6f70f0a95..351e31c7bec1 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 0f0d25e333db..2614b6be623f 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs index 14a5655c8023..4e8cdbade02e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs @@ -148,7 +148,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 06c18ced2a1c..ea78057f2157 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -168,10 +168,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index d4e0bd11b830..033acfcc2f86 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -289,25 +289,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs index 6861539d48cb..f17ca142e62e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs @@ -178,13 +178,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs index 6895b23c9654..7fe2badda61a 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -188,13 +188,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs index ed26f278fc46..28e983f8c1f7 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs @@ -218,13 +218,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs index 95c14d25d542..6bf3eafa9dde 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs @@ -154,13 +154,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 270d77309df1..31d9c34c847b 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index c2fbcd6a7e57..162b12039c99 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs index 877795d5cfd4..554aabd49342 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -188,13 +188,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs index fd95bd629bbe..67d43b51ee6f 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs @@ -148,7 +148,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs index afdff1b19be1..1be1967bbf30 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs @@ -154,13 +154,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs index d2b0f9fc8e45..a0e29952cf6b 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs @@ -141,10 +141,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs index 26ea3730fba7..88ffeedd57e2 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs @@ -249,22 +249,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs index c44fc9083169..e4b3cccaac9a 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs @@ -141,16 +141,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs index 9795a7beec1b..1201a731b6e7 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs @@ -161,13 +161,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs index 77c923435187..15382bf6aba3 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs @@ -203,13 +203,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs index 90236769cb4a..b90a63c9080f 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs @@ -148,7 +148,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index d1828daed8ba..ce569aa8a223 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -154,16 +154,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs index 7c1c3f7fe287..6ea89bfa46cf 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -196,16 +196,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs index 94e9213fe899..c75866f77a37 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs @@ -141,10 +141,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 60ef9165d975..e6886061ce16 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -154,7 +154,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4b96563e3461..f38c40855cf9 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -148,7 +148,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs index 48aba268c5b9..4b36c6fb200e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs @@ -141,22 +141,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs index aae60577a78f..4060b8ea853e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs @@ -141,22 +141,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs index f43fe465b65a..16dc36126f60 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs @@ -141,16 +141,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs index d26192a1adba..0204ffd11b67 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs @@ -208,10 +208,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs index 74cb49595291..18696b473eaa 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs @@ -155,10 +155,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs index 5c6eccf09721..fb02ff8e8d41 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -307,10 +307,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs index 57e8cd61d373..4e67307c599d 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs @@ -825,31 +825,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a4d6ad4c2f68..b3efb43120f2 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -154,16 +154,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/File.cs index c26fe4f172ce..5b777b632272 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/File.cs @@ -149,7 +149,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 77eeacd1bfce..c77f93cc5dda 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -168,10 +168,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs index a26bca0b15d4..9bc633fb1347 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs @@ -148,7 +148,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 23d6edaccb8c..ed0f645778c7 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -148,7 +148,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index bc64a259b1eb..5e2b0098cd89 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -829,103 +829,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs index b9adf9d71cc8..9bef81f9165b 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs @@ -186,7 +186,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs index a2198a7ec32a..319c972914d5 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs @@ -190,7 +190,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 831bc16de8c2..a561b03d9a80 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -158,10 +158,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 098874540247..ef6d3ab7c298 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -209,10 +209,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index f14013f65705..8428d73f1f4d 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -295,22 +295,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 261267b6c02f..76f823c04feb 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -147,16 +147,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/List.cs index d6cd61b8668e..d2428a617391 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/List.cs @@ -148,7 +148,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 3de1c9b7ebc5..5089070ed31b 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -168,10 +168,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs index a6fd263ff981..02f86812548c 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs @@ -217,10 +217,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs index a8ff51c976de..be29a234a40f 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs @@ -274,16 +274,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 93b19a688f74..b161e262d82e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -148,7 +148,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs index f79216144534..88bbc61728d0 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -148,7 +148,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a2d05afb5bf..00c741fe8230 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -220,16 +220,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs index e9036f7546d3..e7b51c028c54 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -148,7 +148,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs index 4538cb6884df..6f113f248688 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs @@ -168,10 +168,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs index 357ce5b2d143..aa8b7f0e664c 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs @@ -148,7 +148,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs index 37f41d119044..a57af8984382 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs @@ -242,19 +242,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 358f13e8de5f..49af3bbc0011 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -154,16 +154,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs index 5bf7c08c2823..4c37377b8b56 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs @@ -378,10 +378,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs index f768d56b98d9..650fa75d3470 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs @@ -196,10 +196,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs index b051d11b1761..f3b39743e06c 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -148,7 +148,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index e041d875bc51..181ca33013a1 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -211,16 +211,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs index 5a9d1362547d..2a4479bb6892 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs @@ -343,22 +343,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs index 4a94f026f474..611702e0a740 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -188,13 +188,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs index 3cac06dda885..b5a9f269d06a 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs @@ -121,10 +121,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs index 4e7c71f8a59d..2f834d4ad27e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs @@ -324,28 +324,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs index 5640fd1d9c8d..4e3ca083f0e0 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs @@ -196,10 +196,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs index eabed88718f8..07a6da257acc 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -196,10 +196,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index ac2b8e61cd67..6da445395d9b 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -141,10 +141,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 8a93f3022a91..721f02f2e915 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -206,10 +206,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs index 599aa94d5e5e..b876a0dfebb4 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2080,136 +2080,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs index 5e2d71377d97..bbeabbb4a288 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs @@ -191,13 +191,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs index 36c27ec413ed..a939792e9831 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs @@ -194,19 +194,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs index bbaefb23e8b7..1dd908069a7d 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -168,10 +168,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index e292a138c48e..af7998bdab26 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -148,7 +148,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 9e866915b32f..fd5f5a3f6e69 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -154,16 +154,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs index 4c152f2ef2fe..2a1135dcf33c 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs @@ -196,10 +196,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs index 5aedd501c226..2d1a8d444eba 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -141,10 +141,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs index b18fbb1d936e..4ff352dcff8f 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -196,10 +196,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index e7ed21a8c3ca..7de7001d7e74 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -154,16 +154,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs index edf8a9edcacf..5d8916e01495 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -168,10 +168,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs index a5f86d17a002..9d3e01cfe13f 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs @@ -168,10 +168,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 508388831ad1..a77e39fb335a 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index cdd78842b091..fa3bdcca712c 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs index 7410185d15aa..c55f09c24ad7 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -244,16 +244,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 41fcb61c7c76..79f0d4ead06e 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -148,7 +148,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs index eee7fb7736e2..ed2c4f9b1ee4 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs @@ -190,13 +190,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs index 5e994d5c98e6..a136888f90d4 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs @@ -217,10 +217,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs index 20b576d5efbd..bacb230b71b7 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -141,10 +141,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/User.cs index 2589af030b24..66da53d722ec 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/User.cs @@ -373,31 +373,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs index a55ad54be20d..29ec64728866 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs @@ -181,16 +181,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs index 143976f6b272..fa37280bcd17 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs @@ -248,13 +248,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 733adac3c5c4..184ee862a155 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -221,7 +221,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index f8d7a66197ae..43cfd5298ad3 100644 --- a/samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/generichost/net10/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -169,10 +169,10 @@ public override NowGet200Response Read(ref Utf8JsonReader utf8JsonReader, Type t } if (now.IsSet && now.Value == null) - throw new ArgumentNullException(nameof(now), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: now."); if (today.IsSet && today.Value == null) - throw new ArgumentNullException(nameof(today), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: today."); return new NowGet200Response(now, today); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 7c252ba330b0..b9b18bbc096f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -143,16 +143,16 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: children."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: $_type."); return new Adult(children, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs index 3724280d3572..d5462ab3dbf8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -163,19 +163,19 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: age."); if (boosterSeat.IsSet && boosterSeat.Value == null) - throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: boosterSeat."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: $_type."); return new Child(age, boosterSeat, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs index fea620444347..625786083eea 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -195,13 +195,13 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: $_type."); return new Person(firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Apple.cs index 20d70a152cc9..df4bf4e37b63 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Apple.cs @@ -145,7 +145,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Banana.cs index 146ac2da958d..88894092e99e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs index 5ccdcf14a13d..d7af13151fef 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -194,7 +194,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs index 136b36a89958..b5687ef261f4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs @@ -144,7 +144,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs index 4e5dcd6f057e..7dbf98be365b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs @@ -144,7 +144,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs index 6d5e8f1779c9..2dae9960660f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs @@ -193,7 +193,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Activity.cs index 6ef65dc03490..99262aea8c59 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 0900bb21d987..03949c150021 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1ea3cc6d6d13..326b04bfc736 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Animal.cs index af30b50b1efd..24bb80b1161e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs index 891117de444d..53bcd08ade21 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Apple.cs index 415d977cb273..75cee1b3c300 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs index a8bb9970d266..3b78fca25fa6 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index cf982fbeaccc..a7dd1fab07e2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9a0450a54939..977b54bc1746 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs index 946aa81707b4..083bb513576a 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Banana.cs index 1963adefce90..f330f0454ebf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs index d88783cbab2d..b7bc9af9a97d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs index 35fa5c799fe0..fd01e5b09eaf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs index dbf7d5878726..ea0441165f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Category.cs index c33db720faab..6dc2362cc48e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs index fffbe391d3d5..73f63544fda2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs @@ -141,13 +141,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs index 2cec4e3ee767..62e448309893 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs index 8d25c498e494..4fb582c6484a 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -134,16 +134,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f272f800a65b..b4f039671025 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5b795e143682..de7a0f313660 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs index 5b8587c218e1..7726e8d5c4c2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs @@ -131,22 +131,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs index 82cc312ea062..bb2711891d54 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs @@ -131,22 +131,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Dog.cs index 8f43963d5b4f..e076e9c9525e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Drawing.cs index 2bf745f2f7d4..2aa9413a0cfb 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs index 96c5f9bbb699..ac797b4b2a4d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -165,10 +165,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 3ed05af68273..c9546d45bb5e 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 @@ -298,31 +298,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/File.cs index f3b89016ca8c..159542d8f5fa 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 70c50972598e..d9dd4b26705c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Foo.cs index 0bde70e7d10c..a631d8e2d18a 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 6f6db2d948a2..1bbcb2be323c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index b16df5f518e0..30fe9ab86ca4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Fruit.cs index e6781b1c920b..d1a64f42f03b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs index 2df46dde14c4..8d572546f439 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4655c9cbb01e..c3b0e495f381 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/List.cs index 0ba836f7be5f..eef51661c9d7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4e22fe711e2a..0ca2db559ebe 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MapTest.cs index 3b1494e797da..a8f945455f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MapTest.cs @@ -205,16 +205,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 90526549ac2b..02b04b791e8e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2376786bd50e..40618643e1b0 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index d406287f4039..ea319b6748e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs index 2220371abceb..87e11e6999e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs index 09990a706a8c..d9971e56423d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs index 64b5da999734..429d211bd3f2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Name.cs index f657f42be0ab..8d1f2aeb0db8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs index ba9cfa507092..dd795c454755 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs index 209be6be1047..f9c0e035e424 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7881bc48f66e..1cf2977d186e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Order.cs index 5db132a9cff4..e290d5709f95 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Order.cs @@ -251,22 +251,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs index 448c538f19d8..99b0abbaa0f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pet.cs index de88b51a5ecf..f7160d5780d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pet.cs @@ -232,28 +232,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6c679f4eadf0..3fbd226849a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs index d756563bf256..e9bd5a324422 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -895,136 +895,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Result.cs index 7ed1ea210629..533d484093fd 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Return.cs index 6870e58a4e5b..c44b71b7659b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 88ac872eba81..455206911cd3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7ac7e71cbc15..367680a1a300 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs index b6bcd6886413..51235500e5cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Tag.cs index d0d4298cab55..04b4e2a7feb8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index db057bf9b74f..77efc5ff13d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index e7b97dd14788..d58df26387cf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs index c5b9db5913dd..16abb0fa533d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -168,16 +168,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b2ef6e096109..1e931bd94731 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestResult.cs index e367448c907f..5da58612b7ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/User.cs index dd4db4f456f1..6371c3897a76 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Whale.cs index c1abfbfd12c0..a862447465b1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Zebra.cs index 6ee3d041ef55..fd8f11161c9f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/Zebra.cs @@ -158,13 +158,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 3ad9a7fbd48a..4690a7b40e2f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -145,7 +145,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Apple.cs index 20d70a152cc9..df4bf4e37b63 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Apple.cs @@ -145,7 +145,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Banana.cs index 146ac2da958d..88894092e99e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Fruit.cs index bf55b771e444..80949bcaa7c1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -211,7 +211,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Orange.cs b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Orange.cs index ea6d4f8d915d..f940611e82c1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Orange.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/OneOf/src/Org.OpenAPITools/Model/Orange.cs @@ -145,7 +145,7 @@ public override Orange Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class Orange."); + throw new JsonException("Property is not nullable for class Orange: sweet."); return new Orange(sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 6ef65dc03490..99262aea8c59 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 0900bb21d987..03949c150021 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1ea3cc6d6d13..326b04bfc736 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs index af30b50b1efd..24bb80b1161e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 891117de444d..53bcd08ade21 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 415d977cb273..75cee1b3c300 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index a8bb9970d266..3b78fca25fa6 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index cf982fbeaccc..a7dd1fab07e2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9a0450a54939..977b54bc1746 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 946aa81707b4..083bb513576a 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 1963adefce90..f330f0454ebf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index d88783cbab2d..b7bc9af9a97d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 35fa5c799fe0..fd01e5b09eaf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs index dbf7d5878726..ea0441165f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs index c33db720faab..6dc2362cc48e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 0df505327662..f14bc54e1086 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 2cec4e3ee767..62e448309893 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f272f800a65b..b4f039671025 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5b795e143682..de7a0f313660 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 8f43963d5b4f..e076e9c9525e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 2bf745f2f7d4..2aa9413a0cfb 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 75fc3819ecf1..bb1e852f9e73 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 bd1502d4326b..41c51e61b129 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 @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs index f3b89016ca8c..159542d8f5fa 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 70c50972598e..d9dd4b26705c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 0bde70e7d10c..a631d8e2d18a 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 6f6db2d948a2..1bbcb2be323c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b16df5f518e0..30fe9ab86ca4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index e6781b1c920b..d1a64f42f03b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 2df46dde14c4..8d572546f439 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4655c9cbb01e..c3b0e495f381 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs index 0ba836f7be5f..eef51661c9d7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4e22fe711e2a..0ca2db559ebe 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index c216c04d6468..fda445a67fcd 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 90526549ac2b..02b04b791e8e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2376786bd50e..40618643e1b0 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index d406287f4039..ea319b6748e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 2220371abceb..87e11e6999e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 09990a706a8c..d9971e56423d 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 64b5da999734..429d211bd3f2 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs index f657f42be0ab..8d1f2aeb0db8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index ba9cfa507092..dd795c454755 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 209be6be1047..f9c0e035e424 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7881bc48f66e..1cf2977d186e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs index 4d4a6167efc2..610909884b0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 448c538f19d8..99b0abbaa0f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs index d8bb45eae944..33a3d6dece38 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6c679f4eadf0..3fbd226849a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 a5e6b6f451b2..fae1bd2034ce 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 @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Result.cs index 7ed1ea210629..533d484093fd 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs index 6870e58a4e5b..c44b71b7659b 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 88ac872eba81..455206911cd3 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7ac7e71cbc15..367680a1a300 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index b6bcd6886413..51235500e5cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs index d0d4298cab55..04b4e2a7feb8 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index db057bf9b74f..77efc5ff13d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index e7b97dd14788..d58df26387cf 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b2ef6e096109..1e931bd94731 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index e367448c907f..5da58612b7ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs index dd4db4f456f1..6371c3897a76 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs index c1abfbfd12c0..a862447465b1 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index c6144e93c73d..4d6c01689db7 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 4ce3561c85ec..44b24d2dad67 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index 1fbff79470fe..e398a5c02a61 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -167,10 +167,10 @@ public override NowGet200Response Read(ref Utf8JsonReader utf8JsonReader, Type t } if (now.IsSet && now.Value == null) - throw new ArgumentNullException(nameof(now), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: now."); if (today.IsSet && today.Value == null) - throw new ArgumentNullException(nameof(today), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: today."); return new NowGet200Response(now, today); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 7c252ba330b0..b9b18bbc096f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -143,16 +143,16 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: children."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: $_type."); return new Adult(children, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs index 3724280d3572..d5462ab3dbf8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -163,19 +163,19 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: age."); if (boosterSeat.IsSet && boosterSeat.Value == null) - throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: boosterSeat."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: $_type."); return new Child(age, boosterSeat, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs index fea620444347..625786083eea 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -195,13 +195,13 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: $_type."); return new Person(firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs index 20d70a152cc9..df4bf4e37b63 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs @@ -145,7 +145,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs index 146ac2da958d..88894092e99e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs index 5ccdcf14a13d..d7af13151fef 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -194,7 +194,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs index 136b36a89958..b5687ef261f4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs @@ -144,7 +144,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs index 4e5dcd6f057e..7dbf98be365b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs @@ -144,7 +144,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs index 6d5e8f1779c9..2dae9960660f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs @@ -193,7 +193,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Activity.cs index 6ef65dc03490..99262aea8c59 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 0900bb21d987..03949c150021 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1ea3cc6d6d13..326b04bfc736 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Animal.cs index af30b50b1efd..24bb80b1161e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs index 891117de444d..53bcd08ade21 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Apple.cs index 415d977cb273..75cee1b3c300 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs index a8bb9970d266..3b78fca25fa6 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index cf982fbeaccc..a7dd1fab07e2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9a0450a54939..977b54bc1746 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs index 946aa81707b4..083bb513576a 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Banana.cs index 1963adefce90..f330f0454ebf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs index d88783cbab2d..b7bc9af9a97d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs index 35fa5c799fe0..fd01e5b09eaf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Cat.cs index dbf7d5878726..ea0441165f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Category.cs index c33db720faab..6dc2362cc48e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs index fffbe391d3d5..73f63544fda2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs @@ -141,13 +141,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs index 2cec4e3ee767..62e448309893 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs index 8d25c498e494..4fb582c6484a 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -134,16 +134,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f272f800a65b..b4f039671025 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5b795e143682..de7a0f313660 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs index 5b8587c218e1..7726e8d5c4c2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs @@ -131,22 +131,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs index 82cc312ea062..bb2711891d54 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs @@ -131,22 +131,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Dog.cs index 8f43963d5b4f..e076e9c9525e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs index 2bf745f2f7d4..2aa9413a0cfb 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs index 96c5f9bbb699..ac797b4b2a4d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -165,10 +165,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 3ed05af68273..c9546d45bb5e 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 @@ -298,31 +298,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/File.cs index f3b89016ca8c..159542d8f5fa 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 70c50972598e..d9dd4b26705c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Foo.cs index 0bde70e7d10c..a631d8e2d18a 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 6f6db2d948a2..1bbcb2be323c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index b16df5f518e0..30fe9ab86ca4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs index e6781b1c920b..d1a64f42f03b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs index 2df46dde14c4..8d572546f439 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4655c9cbb01e..c3b0e495f381 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/List.cs index 0ba836f7be5f..eef51661c9d7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4e22fe711e2a..0ca2db559ebe 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs index 3b1494e797da..a8f945455f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs @@ -205,16 +205,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 90526549ac2b..02b04b791e8e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2376786bd50e..40618643e1b0 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index d406287f4039..ea319b6748e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs index 2220371abceb..87e11e6999e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs index 09990a706a8c..d9971e56423d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs index 64b5da999734..429d211bd3f2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Name.cs index f657f42be0ab..8d1f2aeb0db8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs index ba9cfa507092..dd795c454755 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs index 209be6be1047..f9c0e035e424 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7881bc48f66e..1cf2977d186e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Order.cs index 5db132a9cff4..e290d5709f95 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Order.cs @@ -251,22 +251,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs index 448c538f19d8..99b0abbaa0f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pet.cs index de88b51a5ecf..f7160d5780d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pet.cs @@ -232,28 +232,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6c679f4eadf0..3fbd226849a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs index d756563bf256..e9bd5a324422 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -895,136 +895,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Result.cs index 7ed1ea210629..533d484093fd 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Return.cs index 6870e58a4e5b..c44b71b7659b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 88ac872eba81..455206911cd3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7ac7e71cbc15..367680a1a300 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs index b6bcd6886413..51235500e5cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Tag.cs index d0d4298cab55..04b4e2a7feb8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index db057bf9b74f..77efc5ff13d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index e7b97dd14788..d58df26387cf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs index c5b9db5913dd..16abb0fa533d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -168,16 +168,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b2ef6e096109..1e931bd94731 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs index e367448c907f..5da58612b7ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/User.cs index dd4db4f456f1..6371c3897a76 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Whale.cs index c1abfbfd12c0..a862447465b1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs index 6ee3d041ef55..fd8f11161c9f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs @@ -158,13 +158,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 3ad9a7fbd48a..4690a7b40e2f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -145,7 +145,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Apple.cs index 20d70a152cc9..df4bf4e37b63 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Apple.cs @@ -145,7 +145,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Banana.cs index 146ac2da958d..88894092e99e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs index bf55b771e444..80949bcaa7c1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -211,7 +211,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Orange.cs b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Orange.cs index ea6d4f8d915d..f940611e82c1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Orange.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/OneOf/src/Org.OpenAPITools/Model/Orange.cs @@ -145,7 +145,7 @@ public override Orange Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class Orange."); + throw new JsonException("Property is not nullable for class Orange: sweet."); return new Orange(sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 6ef65dc03490..99262aea8c59 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 0900bb21d987..03949c150021 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1ea3cc6d6d13..326b04bfc736 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs index af30b50b1efd..24bb80b1161e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 891117de444d..53bcd08ade21 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 415d977cb273..75cee1b3c300 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index a8bb9970d266..3b78fca25fa6 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index cf982fbeaccc..a7dd1fab07e2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9a0450a54939..977b54bc1746 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 946aa81707b4..083bb513576a 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 1963adefce90..f330f0454ebf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index d88783cbab2d..b7bc9af9a97d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 35fa5c799fe0..fd01e5b09eaf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs index dbf7d5878726..ea0441165f89 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs index c33db720faab..6dc2362cc48e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 0df505327662..f14bc54e1086 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 2cec4e3ee767..62e448309893 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f272f800a65b..b4f039671025 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5b795e143682..de7a0f313660 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 8f43963d5b4f..e076e9c9525e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 2bf745f2f7d4..2aa9413a0cfb 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 75fc3819ecf1..bb1e852f9e73 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 bd1502d4326b..41c51e61b129 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 @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs index f3b89016ca8c..159542d8f5fa 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 70c50972598e..d9dd4b26705c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 0bde70e7d10c..a631d8e2d18a 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 6f6db2d948a2..1bbcb2be323c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b16df5f518e0..30fe9ab86ca4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index e6781b1c920b..d1a64f42f03b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 2df46dde14c4..8d572546f439 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4655c9cbb01e..c3b0e495f381 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs index 0ba836f7be5f..eef51661c9d7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4e22fe711e2a..0ca2db559ebe 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index c216c04d6468..fda445a67fcd 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 90526549ac2b..02b04b791e8e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2376786bd50e..40618643e1b0 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index d406287f4039..ea319b6748e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 2220371abceb..87e11e6999e3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 09990a706a8c..d9971e56423d 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 64b5da999734..429d211bd3f2 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs index f657f42be0ab..8d1f2aeb0db8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index ba9cfa507092..dd795c454755 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 209be6be1047..f9c0e035e424 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7881bc48f66e..1cf2977d186e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs index 4d4a6167efc2..610909884b0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 448c538f19d8..99b0abbaa0f5 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs index d8bb45eae944..33a3d6dece38 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6c679f4eadf0..3fbd226849a8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 a5e6b6f451b2..fae1bd2034ce 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 @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Result.cs index 7ed1ea210629..533d484093fd 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs index 6870e58a4e5b..c44b71b7659b 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 88ac872eba81..455206911cd3 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7ac7e71cbc15..367680a1a300 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index b6bcd6886413..51235500e5cc 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs index d0d4298cab55..04b4e2a7feb8 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index db057bf9b74f..77efc5ff13d4 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index e7b97dd14788..d58df26387cf 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b2ef6e096109..1e931bd94731 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index e367448c907f..5da58612b7ef 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs index dd4db4f456f1..6371c3897a76 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs index c1abfbfd12c0..a862447465b1 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index c6144e93c73d..4d6c01689db7 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 4ce3561c85ec..44b24d2dad67 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index 1fbff79470fe..e398a5c02a61 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -167,10 +167,10 @@ public override NowGet200Response Read(ref Utf8JsonReader utf8JsonReader, Type t } if (now.IsSet && now.Value == null) - throw new ArgumentNullException(nameof(now), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: now."); if (today.IsSet && today.Value == null) - throw new ArgumentNullException(nameof(today), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: today."); return new NowGet200Response(now, today); } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 4213420714a8..e39d6528c83e 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -145,16 +145,16 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: children."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: $_type."); return new Adult(children, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs index f71f244652dc..ca9e960e944e 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -165,19 +165,19 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: age."); if (boosterSeat.IsSet && boosterSeat.Value == null) - throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: boosterSeat."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: $_type."); return new Child(age, boosterSeat, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs index e65419a3b600..59df30ef628a 100644 --- a/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net8/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -197,13 +197,13 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: $_type."); return new Person(firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs index 9ccac387b196..70eeaef7e581 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -196,7 +196,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs index ba2d70c2fab5..2f7c7293e846 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs @@ -146,7 +146,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs index 7b0cc8bc8756..df0d290f06ee 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs @@ -146,7 +146,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs index c7ad4a614836..f3a5418e2170 100644 --- a/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs @@ -195,7 +195,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs index 46fc753b3481..0d9b46a978e5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs @@ -141,13 +141,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs index 8d25c498e494..4fb582c6484a 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -134,16 +134,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs index 5b8587c218e1..7726e8d5c4c2 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs @@ -131,22 +131,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs index 82cc312ea062..bb2711891d54 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs @@ -131,22 +131,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs index ee70392a1686..79d09774978a 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -165,10 +165,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 780950460e89..02a65dd082b3 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 @@ -298,31 +298,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 2f37dd2a61d9..38948d0c1ed3 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs index 463b714170dd..6e40d4275163 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MapTest.cs @@ -205,16 +205,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Order.cs index 66edef8216f7..32ecad789af6 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Order.cs @@ -251,22 +251,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pet.cs index f60a0987b590..bad8f48861c7 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pet.cs @@ -232,28 +232,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs index eeda5ef0fcc7..2007d33c8f9b 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -895,136 +895,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs index c5b9db5913dd..16abb0fa533d 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -168,16 +168,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs index 67b6d90eb1d7..69ee715e38be 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/Zebra.cs @@ -158,13 +158,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index ad7eadb1b479..ee7e3eecf739 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -145,7 +145,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs index d43c6780ca28..ca8cfb1a062d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs @@ -147,7 +147,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 23f5c4b3a85d..4cb0bfbebdc6 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -167,10 +167,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index ad641f68f2e9..9e6732bcbc10 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -288,25 +288,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs index 6344d530cd6e..457d433df3bb 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs @@ -177,13 +177,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs index 70585c8acf5b..eae8aa1c7bfd 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -187,13 +187,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs index edd6e65f1f41..9627141cf147 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs @@ -217,13 +217,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs index a98f5bd8787f..f21dcb8014b1 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs @@ -153,13 +153,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 509645c3f350..522624a5ce1d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9d5c27336962..67bbfe87647d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs index 14d7950c4b6f..a01ecacdd72b 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -187,13 +187,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs index 0a7d794e23fc..ca7e413ceeb6 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs index 1973db4c4bed..96a98e9e2f69 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs @@ -153,13 +153,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs index 8dbfb7552b5f..001ce4a14655 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs @@ -140,10 +140,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs index 68e8220438eb..85b6baa2d754 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs @@ -248,22 +248,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs index 0f47bd35e784..05ee372584c4 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs @@ -140,16 +140,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs index d411efbb83bd..63a943b1ca32 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs @@ -160,13 +160,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs index d7c5a4cd96ec..506651c5b421 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs @@ -202,13 +202,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs index 16551511b256..ba22c38d013f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs @@ -147,7 +147,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index e1e504b538e1..bda6577d02c2 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -153,16 +153,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs index 260d78873e2e..1b77996e10c2 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -195,16 +195,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs index ed6bc6534338..fb8adbaeb62f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs @@ -140,10 +140,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f39aa601716f..bde9eedbf899 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -153,7 +153,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5e4782e9741b..edf3580a5006 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -147,7 +147,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs index 68a2f65c9aff..d0913992d157 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs @@ -140,22 +140,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs index 5a130166a0b1..5cd06903b366 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs @@ -140,22 +140,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs index b8435f95759c..d138df0d6905 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs @@ -140,16 +140,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs index cce96329e588..678e0ed5419d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs @@ -207,10 +207,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs index a81af5d8181b..4c21cc792a55 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs @@ -154,10 +154,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs index 05f5e7db1d24..087a026beaaf 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -306,10 +306,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 62c8f51ce807..2eefc1ef6ba2 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 @@ -824,31 +824,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 407e33a7b6f5..c30ec912d755 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -153,16 +153,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs index 6608c8f2c0e0..d5eb5d549ea6 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs @@ -148,7 +148,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index d8837421dcac..7e388fa26fa2 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -167,10 +167,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs index 4b75918a83d5..f410f110f43c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs @@ -147,7 +147,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index baa4b149818a..cfc038f14e58 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -147,7 +147,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 1badd1c0d948..3c0a18995dc9 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -828,103 +828,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs index f902f78034c4..363808c467e3 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs @@ -185,7 +185,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs index 1eccb13e9003..57ccb03380ab 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs @@ -189,7 +189,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 4477d4279465..b5365a68d6ba 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -157,10 +157,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 1a446ca46e5a..103d547b76d2 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -208,10 +208,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 82b78a3e00f9..fc3ff4a253e9 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -294,22 +294,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index b211cf0586b1..466c62aea797 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -146,16 +146,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs index b8a8a257d0d2..51f16d706697 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs @@ -147,7 +147,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 70963bef2fc5..91d2b5fb1c3c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -167,10 +167,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs index fc906f76d9ff..05a5e5d55604 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs @@ -216,10 +216,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs index 64474ff0d16d..c232c64f65da 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs @@ -273,16 +273,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 48eca2b1e0b8..f5f988259cdf 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -147,7 +147,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs index e5c9f6f2f2f7..03581cdcfd40 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -147,7 +147,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1cef2917ba78..840ed7657912 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -219,16 +219,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs index 77c1611f8f80..b385cf0dd9ee 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -147,7 +147,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs index ff4080153aea..bf0f3e968c36 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs @@ -167,10 +167,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs index b32d7f964146..4b654356987a 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs @@ -147,7 +147,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs index 8fd568be1a6b..73f861dcc6cc 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs @@ -241,19 +241,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 10c8125b1068..c8a57aa7547f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -153,16 +153,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs index d1327d7b480f..96cbd8c1fcca 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs @@ -377,10 +377,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs index b257d25ab62f..f8120a285900 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs @@ -195,10 +195,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs index a463ed4572d3..25105240d38d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -147,7 +147,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 03727598207c..5b4319dbc5ef 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -210,16 +210,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs index ee4d0c85d40a..52073abb4d53 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs @@ -342,22 +342,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs index 686aa2d77797..fe4f0786dbaf 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -187,13 +187,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs index 70e91c22627e..8d83f726bb64 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs @@ -120,10 +120,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs index 5c16160c5db9..84a01f8eeae3 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs @@ -323,28 +323,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs index 217360908bd8..fa25f86f0451 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs @@ -195,10 +195,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs index 258df7403653..f3ef0fda6d96 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -195,10 +195,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index bbd3a56b31ed..56c9dfeac6ba 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -140,10 +140,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 3b1999efb42d..72ccb4531a7d 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -205,10 +205,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 1912f3c24ebf..186dfc468ead 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 @@ -2079,136 +2079,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs index a6bef2efe103..fe06dd89d4c9 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs @@ -190,13 +190,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs index fd9446247331..12c679cd5146 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs @@ -193,19 +193,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs index ac6dd43ef0b2..056240574ca5 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -167,10 +167,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 55d774689f49..264d24e0505b 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -147,7 +147,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index f1779050584b..fd0f1d1bcba9 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -153,16 +153,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs index 22f37a48e620..9946323dcdbe 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs @@ -195,10 +195,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs index cb375197e488..4404aab7f1b1 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -140,10 +140,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 4df1e6983ad1..665942a5f44f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -195,10 +195,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 0034604725d0..c0ba8c4782be 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -153,16 +153,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs index 81c58c98aa68..026f410268fe 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -167,10 +167,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs index a16ea726bfff..0702b6e968f2 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs @@ -167,10 +167,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 182412d38e32..61b664997f85 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 97b4b270f1c9..54b592a8f5a4 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs index 5b568b36e9ec..e75e8fbaeb7c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -243,16 +243,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 07d98ed51393..3e8d19707387 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -147,7 +147,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs index d168aff8b9c2..f8a9abc06052 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs @@ -189,13 +189,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs index 0be5259f1ebe..c3d21195968a 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs @@ -216,10 +216,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs index c97244ab95ff..358a0e2aa20c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -140,10 +140,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs index c6a4d2cddb86..ce498d7d327c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs @@ -372,31 +372,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs index 74e3afd8dbf8..d0099756b15c 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs @@ -180,16 +180,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs index f6faea2fd5ed..fae5958200e6 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs @@ -247,13 +247,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 796310e1783f..cf5d2bcb6a8f 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -220,7 +220,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs index af45459bafc7..995c0a87ad8b 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -213,7 +213,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Orange.cs b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Orange.cs index 793f5553239f..eea08050f18f 100644 --- a/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Orange.cs +++ b/samples/client/petstore/csharp/generichost/net8/OneOf/src/Org.OpenAPITools/Model/Orange.cs @@ -147,7 +147,7 @@ public override Orange Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class Orange."); + throw new JsonException("Property is not nullable for class Orange: sweet."); return new Orange(sweet); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index d5e2a907d867..fa6b06132a0c 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 231e6fbbf6bc..11f9cab173bd 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 0aaa3e6fe0aa..bd7ccf486fc3 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 @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 2f37dd2a61d9..38948d0c1ed3 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index b5cdc783088c..831d190dfa8d 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Order.cs index d3f99122b153..f678fe600e84 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 6d3d8121e68c..599d7d612422 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 50d69fccab91..779f1eb4f318 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 @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 8bd6f70f0a95..351e31c7bec1 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 0f0d25e333db..2614b6be623f 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs index 14a5655c8023..4e8cdbade02e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs @@ -148,7 +148,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 06c18ced2a1c..ea78057f2157 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -168,10 +168,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index d4e0bd11b830..033acfcc2f86 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -289,25 +289,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs index 6861539d48cb..f17ca142e62e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs @@ -178,13 +178,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs index 6895b23c9654..7fe2badda61a 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -188,13 +188,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs index ed26f278fc46..28e983f8c1f7 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs @@ -218,13 +218,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs index 95c14d25d542..6bf3eafa9dde 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs @@ -154,13 +154,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 270d77309df1..31d9c34c847b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index c2fbcd6a7e57..162b12039c99 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs index 877795d5cfd4..554aabd49342 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -188,13 +188,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs index fd95bd629bbe..67d43b51ee6f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs @@ -148,7 +148,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs index afdff1b19be1..1be1967bbf30 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs @@ -154,13 +154,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs index d2b0f9fc8e45..a0e29952cf6b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs @@ -141,10 +141,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs index 26ea3730fba7..88ffeedd57e2 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs @@ -249,22 +249,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs index c44fc9083169..e4b3cccaac9a 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs @@ -141,16 +141,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs index 9795a7beec1b..1201a731b6e7 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs @@ -161,13 +161,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs index 77c923435187..15382bf6aba3 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs @@ -203,13 +203,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs index 90236769cb4a..b90a63c9080f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs @@ -148,7 +148,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index d1828daed8ba..ce569aa8a223 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -154,16 +154,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs index 7c1c3f7fe287..6ea89bfa46cf 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -196,16 +196,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs index 94e9213fe899..c75866f77a37 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs @@ -141,10 +141,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 60ef9165d975..e6886061ce16 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -154,7 +154,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4b96563e3461..f38c40855cf9 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -148,7 +148,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs index 48aba268c5b9..4b36c6fb200e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs @@ -141,22 +141,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs index aae60577a78f..4060b8ea853e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs @@ -141,22 +141,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs index f43fe465b65a..16dc36126f60 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs @@ -141,16 +141,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs index d26192a1adba..0204ffd11b67 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs @@ -208,10 +208,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs index 74cb49595291..18696b473eaa 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs @@ -155,10 +155,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs index 5c6eccf09721..fb02ff8e8d41 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -307,10 +307,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 57e8cd61d373..4e67307c599d 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 @@ -825,31 +825,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a4d6ad4c2f68..b3efb43120f2 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -154,16 +154,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/File.cs index c26fe4f172ce..5b777b632272 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/File.cs @@ -149,7 +149,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 77eeacd1bfce..c77f93cc5dda 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -168,10 +168,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs index a26bca0b15d4..9bc633fb1347 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs @@ -148,7 +148,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 23d6edaccb8c..ed0f645778c7 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -148,7 +148,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index bc64a259b1eb..5e2b0098cd89 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -829,103 +829,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs index b9adf9d71cc8..9bef81f9165b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs @@ -186,7 +186,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs index a2198a7ec32a..319c972914d5 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs @@ -190,7 +190,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 831bc16de8c2..a561b03d9a80 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -158,10 +158,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 098874540247..ef6d3ab7c298 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -209,10 +209,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index f14013f65705..8428d73f1f4d 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -295,22 +295,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 261267b6c02f..76f823c04feb 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -147,16 +147,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/List.cs index d6cd61b8668e..d2428a617391 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/List.cs @@ -148,7 +148,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 3de1c9b7ebc5..5089070ed31b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -168,10 +168,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs index a6fd263ff981..02f86812548c 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs @@ -217,10 +217,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs index a8ff51c976de..be29a234a40f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs @@ -274,16 +274,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 93b19a688f74..b161e262d82e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -148,7 +148,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs index f79216144534..88bbc61728d0 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -148,7 +148,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a2d05afb5bf..00c741fe8230 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -220,16 +220,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs index e9036f7546d3..e7b51c028c54 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -148,7 +148,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs index 4538cb6884df..6f113f248688 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs @@ -168,10 +168,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs index 357ce5b2d143..aa8b7f0e664c 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs @@ -148,7 +148,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs index 37f41d119044..a57af8984382 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs @@ -242,19 +242,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 358f13e8de5f..49af3bbc0011 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -154,16 +154,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs index 5bf7c08c2823..4c37377b8b56 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs @@ -378,10 +378,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs index f768d56b98d9..650fa75d3470 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs @@ -196,10 +196,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs index b051d11b1761..f3b39743e06c 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -148,7 +148,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index e041d875bc51..181ca33013a1 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -211,16 +211,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs index 5a9d1362547d..2a4479bb6892 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs @@ -343,22 +343,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs index 4a94f026f474..611702e0a740 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -188,13 +188,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs index 3cac06dda885..b5a9f269d06a 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs @@ -121,10 +121,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs index 4e7c71f8a59d..2f834d4ad27e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs @@ -324,28 +324,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs index 5640fd1d9c8d..4e3ca083f0e0 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs @@ -196,10 +196,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs index eabed88718f8..07a6da257acc 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -196,10 +196,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index ac2b8e61cd67..6da445395d9b 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -141,10 +141,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 8a93f3022a91..721f02f2e915 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -206,10 +206,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 599aa94d5e5e..b876a0dfebb4 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 @@ -2080,136 +2080,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs index 5e2d71377d97..bbeabbb4a288 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs @@ -191,13 +191,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs index 36c27ec413ed..a939792e9831 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs @@ -194,19 +194,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs index bbaefb23e8b7..1dd908069a7d 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -168,10 +168,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index e292a138c48e..af7998bdab26 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -148,7 +148,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 9e866915b32f..fd5f5a3f6e69 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -154,16 +154,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs index 4c152f2ef2fe..2a1135dcf33c 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs @@ -196,10 +196,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs index 5aedd501c226..2d1a8d444eba 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -141,10 +141,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs index b18fbb1d936e..4ff352dcff8f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -196,10 +196,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index e7ed21a8c3ca..7de7001d7e74 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -154,16 +154,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs index edf8a9edcacf..5d8916e01495 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -168,10 +168,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs index a5f86d17a002..9d3e01cfe13f 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs @@ -168,10 +168,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 508388831ad1..a77e39fb335a 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index cdd78842b091..fa3bdcca712c 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs index 7410185d15aa..c55f09c24ad7 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -244,16 +244,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 41fcb61c7c76..79f0d4ead06e 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -148,7 +148,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs index eee7fb7736e2..ed2c4f9b1ee4 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs @@ -190,13 +190,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs index 5e994d5c98e6..a136888f90d4 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs @@ -217,10 +217,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs index 20b576d5efbd..bacb230b71b7 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -141,10 +141,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/User.cs index 2589af030b24..66da53d722ec 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/User.cs @@ -373,31 +373,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs index a55ad54be20d..29ec64728866 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs @@ -181,16 +181,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs index 143976f6b272..fa37280bcd17 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs @@ -248,13 +248,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 733adac3c5c4..184ee862a155 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -221,7 +221,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index f8d7a66197ae..43cfd5298ad3 100644 --- a/samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -169,10 +169,10 @@ public override NowGet200Response Read(ref Utf8JsonReader utf8JsonReader, Type t } if (now.IsSet && now.Value == null) - throw new ArgumentNullException(nameof(now), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: now."); if (today.IsSet && today.Value == null) - throw new ArgumentNullException(nameof(today), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: today."); return new NowGet200Response(now, today); } diff --git a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Adult.cs b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Adult.cs index 4213420714a8..e39d6528c83e 100644 --- a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Adult.cs +++ b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Adult.cs @@ -145,16 +145,16 @@ public override Adult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (children.IsSet && children.Value == null) - throw new ArgumentNullException(nameof(children), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: children."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Adult."); + throw new JsonException("Property is not nullable for class Adult: $_type."); return new Adult(children, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Child.cs b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Child.cs index f71f244652dc..ca9e960e944e 100644 --- a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Child.cs +++ b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Child.cs @@ -165,19 +165,19 @@ public override Child Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (age.IsSet && age.Value == null) - throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: age."); if (boosterSeat.IsSet && boosterSeat.Value == null) - throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: boosterSeat."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); + throw new JsonException("Property is not nullable for class Child: $_type."); return new Child(age, boosterSeat, firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Person.cs b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Person.cs index e65419a3b600..59df30ef628a 100644 --- a/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Person.cs +++ b/samples/client/petstore/csharp/generichost/net9/AllOf/src/Org.OpenAPITools/Model/Person.cs @@ -197,13 +197,13 @@ public override Person Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: firstName."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: lastName."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Person."); + throw new JsonException("Property is not nullable for class Person: $_type."); return new Person(firstName, lastName); } diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs index 9ccac387b196..70eeaef7e581 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -196,7 +196,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs index ba2d70c2fab5..2f7c7293e846 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Apple.cs @@ -146,7 +146,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs index 7b0cc8bc8756..df0d290f06ee 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Banana.cs @@ -146,7 +146,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs index c7ad4a614836..f3a5418e2170 100644 --- a/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare/src/Org.OpenAPITools/Model/Fruit.cs @@ -195,7 +195,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs index 46fc753b3481..0d9b46a978e5 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ChildCat.cs @@ -141,13 +141,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs index 8d25c498e494..4fb582c6484a 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -134,16 +134,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs index 5b8587c218e1..7726e8d5c4c2 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant1.cs @@ -131,22 +131,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs index 82cc312ea062..bb2711891d54 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Descendant2.cs @@ -131,22 +131,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs index ee70392a1686..79d09774978a 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -165,10 +165,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs index 780950460e89..02a65dd082b3 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EnumTest.cs @@ -298,31 +298,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 2f37dd2a61d9..38948d0c1ed3 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MapTest.cs index 463b714170dd..6e40d4275163 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MapTest.cs @@ -205,16 +205,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Order.cs index 66edef8216f7..32ecad789af6 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Order.cs @@ -251,22 +251,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pet.cs index f60a0987b590..bad8f48861c7 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pet.cs @@ -232,28 +232,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs index eeda5ef0fcc7..2007d33c8f9b 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -895,136 +895,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs index c5b9db5913dd..16abb0fa533d 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -168,16 +168,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Zebra.cs index 67b6d90eb1d7..69ee715e38be 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/Zebra.cs @@ -158,13 +158,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index ad7eadb1b479..ee7e3eecf739 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -145,7 +145,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs index d43c6780ca28..ca8cfb1a062d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Activity.cs @@ -147,7 +147,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 23f5c4b3a85d..4cb0bfbebdc6 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -167,10 +167,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index ad641f68f2e9..9e6732bcbc10 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -288,25 +288,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs index 6344d530cd6e..457d433df3bb 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Animal.cs @@ -177,13 +177,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs index 70585c8acf5b..eae8aa1c7bfd 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -187,13 +187,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs index edd6e65f1f41..9627141cf147 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Apple.cs @@ -217,13 +217,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs index a98f5bd8787f..f21dcb8014b1 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/AppleReq.cs @@ -153,13 +153,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 509645c3f350..522624a5ce1d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9d5c27336962..67bbfe87647d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -147,7 +147,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs index 14d7950c4b6f..a01ecacdd72b 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -187,13 +187,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs index 0a7d794e23fc..ca7e413ceeb6 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs index 1973db4c4bed..96a98e9e2f69 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BananaReq.cs @@ -153,13 +153,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs index 8dbfb7552b5f..001ce4a14655 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/BasquePig.cs @@ -140,10 +140,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs index 68e8220438eb..85b6baa2d754 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Capitalization.cs @@ -248,22 +248,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs index 0f47bd35e784..05ee372584c4 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Cat.cs @@ -140,16 +140,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs index d411efbb83bd..63a943b1ca32 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Category.cs @@ -160,13 +160,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs index d7c5a4cd96ec..506651c5b421 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ChildCat.cs @@ -202,13 +202,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs index 16551511b256..ba22c38d013f 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ClassModel.cs @@ -147,7 +147,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index e1e504b538e1..bda6577d02c2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -153,16 +153,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs index 260d78873e2e..1b77996e10c2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -195,16 +195,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs index ed6bc6534338..fb8adbaeb62f 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DanishPig.cs @@ -140,10 +140,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f39aa601716f..bde9eedbf899 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -153,7 +153,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5e4782e9741b..edf3580a5006 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -147,7 +147,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs index 68a2f65c9aff..d0913992d157 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant1.cs @@ -140,22 +140,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs index 5a130166a0b1..5cd06903b366 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Descendant2.cs @@ -140,22 +140,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs index b8435f95759c..d138df0d6905 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Dog.cs @@ -140,16 +140,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs index cce96329e588..678e0ed5419d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Drawing.cs @@ -207,10 +207,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs index a81af5d8181b..4c21cc792a55 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EntityBase.cs @@ -154,10 +154,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs index 05f5e7db1d24..087a026beaaf 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -306,10 +306,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs index 62c8f51ce807..2eefc1ef6ba2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EnumTest.cs @@ -824,31 +824,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 407e33a7b6f5..c30ec912d755 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -153,16 +153,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs index 6608c8f2c0e0..d5eb5d549ea6 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/File.cs @@ -148,7 +148,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index d8837421dcac..7e388fa26fa2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -167,10 +167,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs index 4b75918a83d5..f410f110f43c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Foo.cs @@ -147,7 +147,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index baa4b149818a..cfc038f14e58 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -147,7 +147,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs index 1badd1c0d948..3c0a18995dc9 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/FormatTest.cs @@ -828,103 +828,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs index f902f78034c4..363808c467e3 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Fruit.cs @@ -185,7 +185,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs index 1eccb13e9003..57ccb03380ab 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GmFruit.cs @@ -189,7 +189,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 4477d4279465..b5365a68d6ba 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -157,10 +157,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 1a446ca46e5a..103d547b76d2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -208,10 +208,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 82b78a3e00f9..fc3ff4a253e9 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -294,22 +294,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index b211cf0586b1..466c62aea797 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -146,16 +146,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs index b8a8a257d0d2..51f16d706697 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/List.cs @@ -147,7 +147,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 70963bef2fc5..91d2b5fb1c3c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -167,10 +167,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs index fc906f76d9ff..05a5e5d55604 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Mammal.cs @@ -216,10 +216,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs index 64474ff0d16d..c232c64f65da 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MapTest.cs @@ -273,16 +273,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 48eca2b1e0b8..f5f988259cdf 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -147,7 +147,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs index e5c9f6f2f2f7..03581cdcfd40 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -147,7 +147,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1cef2917ba78..840ed7657912 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -219,16 +219,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs index 77c1611f8f80..b385cf0dd9ee 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -147,7 +147,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs index ff4080153aea..bf0f3e968c36 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Model200Response.cs @@ -167,10 +167,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs index b32d7f964146..4b654356987a 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ModelClient.cs @@ -147,7 +147,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs index 8fd568be1a6b..73f861dcc6cc 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Name.cs @@ -241,19 +241,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 10c8125b1068..c8a57aa7547f 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -153,16 +153,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs index d1327d7b480f..96cbd8c1fcca 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableClass.cs @@ -377,10 +377,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs index b257d25ab62f..f8120a285900 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NullableShape.cs @@ -195,10 +195,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs index a463ed4572d3..25105240d38d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -147,7 +147,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 03727598207c..5b4319dbc5ef 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -210,16 +210,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs index ee4d0c85d40a..52073abb4d53 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Order.cs @@ -342,22 +342,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs index 686aa2d77797..fe4f0786dbaf 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -187,13 +187,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs index 70e91c22627e..8d83f726bb64 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ParentPet.cs @@ -120,10 +120,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs index 5c16160c5db9..84a01f8eeae3 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pet.cs @@ -323,28 +323,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs index 217360908bd8..fa25f86f0451 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Pig.cs @@ -195,10 +195,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs index 258df7403653..f3ef0fda6d96 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -195,10 +195,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index bbd3a56b31ed..56c9dfeac6ba 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -140,10 +140,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 3b1999efb42d..72ccb4531a7d 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -205,10 +205,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs index 1912f3c24ebf..186dfc468ead 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2079,136 +2079,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs index a6bef2efe103..fe06dd89d4c9 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Result.cs @@ -190,13 +190,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs index fd9446247331..12c679cd5146 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Return.cs @@ -193,19 +193,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs index ac6dd43ef0b2..056240574ca5 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -167,10 +167,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 55d774689f49..264d24e0505b 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -147,7 +147,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index f1779050584b..fd0f1d1bcba9 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -153,16 +153,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs index 22f37a48e620..9946323dcdbe 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Shape.cs @@ -195,10 +195,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs index cb375197e488..4404aab7f1b1 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -140,10 +140,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 4df1e6983ad1..665942a5f44f 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -195,10 +195,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 0034604725d0..c0ba8c4782be 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -153,16 +153,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs index 81c58c98aa68..026f410268fe 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -167,10 +167,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs index a16ea726bfff..0702b6e968f2 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Tag.cs @@ -167,10 +167,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 182412d38e32..61b664997f85 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 97b4b270f1c9..54b592a8f5a4 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -147,7 +147,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs index 5b568b36e9ec..e75e8fbaeb7c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -243,16 +243,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 07d98ed51393..3e8d19707387 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -147,7 +147,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs index d168aff8b9c2..f8a9abc06052 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TestResult.cs @@ -189,13 +189,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs index 0be5259f1ebe..c3d21195968a 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Triangle.cs @@ -216,10 +216,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs index c97244ab95ff..358a0e2aa20c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -140,10 +140,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs index c6a4d2cddb86..ce498d7d327c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/User.cs @@ -372,31 +372,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs index 74e3afd8dbf8..d0099756b15c 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Whale.cs @@ -180,16 +180,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs index f6faea2fd5ed..fae5958200e6 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/Zebra.cs @@ -247,13 +247,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 796310e1783f..cf5d2bcb6a8f 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -220,7 +220,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Apple.cs index e6e5bf9b1853..62078fd772e4 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Apple.cs @@ -147,7 +147,7 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (kind.IsSet && kind.Value == null) - throw new ArgumentNullException(nameof(kind), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: kind."); return new Apple(kind); } diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Banana.cs index 65dc4a02463e..65f3b8595ee9 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Banana.cs @@ -147,7 +147,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: count."); return new Banana(count); } diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Fruit.cs index af45459bafc7..995c0a87ad8b 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Fruit.cs @@ -213,7 +213,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Orange.cs b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Orange.cs index 793f5553239f..eea08050f18f 100644 --- a/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Orange.cs +++ b/samples/client/petstore/csharp/generichost/net9/OneOf/src/Org.OpenAPITools/Model/Orange.cs @@ -147,7 +147,7 @@ public override Orange Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class Orange."); + throw new JsonException("Property is not nullable for class Orange: sweet."); return new Orange(sweet); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 2fb20fd76ba8..1c125e463c07 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index a7c053f968ff..434f74698e3b 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 2d355959392c..482589a9e5fc 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Animal.cs index 90faf3ed2ad0..371595944d7b 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 332e1e100ce2..57f797027126 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 8559896f3b99..39231f0d396f 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index cc81766fcebe..90b875f38347 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 9a6a9cb6326c..0deac145a207 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1b911bc1d6c0..114ec6836190 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index e42133d4a724..07ecc2d530e9 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Banana.cs index d887a45c931e..01833655a60c 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index db3b3f2aabd1..e51da17d64bb 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 57decedb097c..411ab5061c07 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Cat.cs index f3f27956ed3b..c5c9fa76f628 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Category.cs index d78edc3ee72c..4dfc61b1b3e3 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index d5e2a907d867..fa6b06132a0c 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 012fb4ea1848..9d988f7b5984 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 72a7565ec3c6..cd989244f843 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4e0d1370cc9a..2a867bcc4298 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 5d01cd38ebbe..67c58e4ae967 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index b1c4e76fe748..8e666f2d2867 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 231e6fbbf6bc..11f9cab173bd 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs index 0aaa3e6fe0aa..bd7ccf486fc3 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EnumTest.cs @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/File.cs index 598363737a5e..6aa960a41e31 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 74bfbfa1b1ec..82e18d1ef389 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Foo.cs index ab3a41f87790..42a29e21422b 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5d64e47dc7f5..6c0af8514c82 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b489e77a1e15..fe45e4e488a8 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index a73048ec0ad1..5bd5f12a2603 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 7071fe00f86d..e7a346898f1e 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 2f37dd2a61d9..38948d0c1ed3 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/List.cs index b65cac7456c4..65bc7f611171 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4b1007e9aaf5..3800055a0760 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index b5cdc783088c..831d190dfa8d 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 57207f29ddb1..2814c36e50fa 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index c3a43f3fc745..c3400316bbc5 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 1d5a4defe637..cc59be1b34d9 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index c1fbf300b336..2843e40b0049 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index bb2913f5df66..38197b7ab613 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index f4acaf49d8f1..66179ce2bd9c 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Name.cs index 19757fa1c327..8d2d529f0503 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index 0c4818c0bff4..77edeb3e45e0 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 428f234deaeb..0e5d10a95ada 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index d8bd9f36ea39..9ecaccc0bb1d 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Order.cs index d3f99122b153..f678fe600e84 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 93be59d99690..5e4cea2ad890 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pet.cs index 6d3d8121e68c..599d7d612422 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index ddd15217fc1f..edcaca516e33 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs index 50d69fccab91..779f1eb4f318 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Result.cs index b57d0b4c7e8e..62bc561934d5 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Return.cs index c4b5b9636bb3..a9c51b8a1ec6 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 9b73fae206ff..5e3a5137cb38 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 22702cfaa178..2b804f7bd98c 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index 9b3bfdab8bcf..c24374910fa1 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Tag.cs index 9ac1082f742a..1106d4a4e7ee 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index b48698e26e70..36a4085251e4 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index 4d1c9e06a24f..e6726b227d81 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 5bd2ec9a6bba..a6ad15da33a2 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index 5abf98b1e65b..beb1ab579d11 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/User.cs index 90deb77dbaaa..af6279d66395 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Whale.cs index 1cdb5bad9dd1..5d5e1b5421b6 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index 8bd6f70f0a95..351e31c7bec1 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 0f0d25e333db..2614b6be623f 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs index 14a5655c8023..4e8cdbade02e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Activity.cs @@ -148,7 +148,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 06c18ced2a1c..ea78057f2157 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -168,10 +168,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index d4e0bd11b830..033acfcc2f86 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -289,25 +289,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs index 6861539d48cb..f17ca142e62e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Animal.cs @@ -178,13 +178,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs index 6895b23c9654..7fe2badda61a 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -188,13 +188,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs index ed26f278fc46..28e983f8c1f7 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Apple.cs @@ -218,13 +218,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs index 95c14d25d542..6bf3eafa9dde 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/AppleReq.cs @@ -154,13 +154,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value!, mealy); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 270d77309df1..31d9c34c847b 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index c2fbcd6a7e57..162b12039c99 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -148,7 +148,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs index 877795d5cfd4..554aabd49342 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -188,13 +188,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs index fd95bd629bbe..67d43b51ee6f 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Banana.cs @@ -148,7 +148,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs index afdff1b19be1..1be1967bbf30 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BananaReq.cs @@ -154,13 +154,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value!.Value!, sweet); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs index d2b0f9fc8e45..a0e29952cf6b 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/BasquePig.cs @@ -141,10 +141,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs index 26ea3730fba7..88ffeedd57e2 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Capitalization.cs @@ -249,22 +249,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs index c44fc9083169..e4b3cccaac9a 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Cat.cs @@ -141,16 +141,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs index 9795a7beec1b..1201a731b6e7 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Category.cs @@ -161,13 +161,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs index 77c923435187..15382bf6aba3 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ChildCat.cs @@ -203,13 +203,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs index 90236769cb4a..b90a63c9080f 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ClassModel.cs @@ -148,7 +148,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index d1828daed8ba..ce569aa8a223 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -154,16 +154,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs index 7c1c3f7fe287..6ea89bfa46cf 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -196,16 +196,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs index 94e9213fe899..c75866f77a37 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DanishPig.cs @@ -141,10 +141,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs index 60ef9165d975..e6886061ce16 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -154,7 +154,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 4b96563e3461..f38c40855cf9 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -148,7 +148,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs index 48aba268c5b9..4b36c6fb200e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant1.cs @@ -141,22 +141,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value!, descendantName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs index aae60577a78f..4060b8ea853e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Descendant2.cs @@ -141,22 +141,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value!, confidentiality.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs index f43fe465b65a..16dc36126f60 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Dog.cs @@ -141,16 +141,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs index d26192a1adba..0204ffd11b67 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Drawing.cs @@ -208,10 +208,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs index 74cb49595291..18696b473eaa 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EntityBase.cs @@ -155,10 +155,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs index 5c6eccf09721..fb02ff8e8d41 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -307,10 +307,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs index 57e8cd61d373..4e67307c599d 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EnumTest.cs @@ -825,31 +825,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value!.Value!, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index a4d6ad4c2f68..b3efb43120f2 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -154,16 +154,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/File.cs index c26fe4f172ce..5b777b632272 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/File.cs @@ -149,7 +149,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 77eeacd1bfce..c77f93cc5dda 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -168,10 +168,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs index a26bca0b15d4..9bc633fb1347 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Foo.cs @@ -148,7 +148,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 23d6edaccb8c..ed0f645778c7 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -148,7 +148,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs index bc64a259b1eb..5e2b0098cd89 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/FormatTest.cs @@ -829,103 +829,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value!, date.Value!.Value!, number.Value!.Value!, password.Value!, stringFormattedAsDecimalRequired.Value!.Value!, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs index b9adf9d71cc8..9bef81f9165b 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Fruit.cs @@ -186,7 +186,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs index a2198a7ec32a..319c972914d5 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GmFruit.cs @@ -190,7 +190,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 831bc16de8c2..a561b03d9a80 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -158,10 +158,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 098874540247..ef6d3ab7c298 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -209,10 +209,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index f14013f65705..8428d73f1f4d 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -295,22 +295,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 261267b6c02f..76f823c04feb 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -147,16 +147,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/List.cs index d6cd61b8668e..d2428a617391 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/List.cs @@ -148,7 +148,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 3de1c9b7ebc5..5089070ed31b 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -168,10 +168,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs index a6fd263ff981..02f86812548c 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Mammal.cs @@ -217,10 +217,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs index a8ff51c976de..be29a234a40f 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MapTest.cs @@ -274,16 +274,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 93b19a688f74..b161e262d82e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -148,7 +148,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs index f79216144534..88bbc61728d0 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -148,7 +148,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 2a2d05afb5bf..00c741fe8230 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -220,16 +220,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs index e9036f7546d3..e7b51c028c54 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -148,7 +148,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs index 4538cb6884df..6f113f248688 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Model200Response.cs @@ -168,10 +168,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs index 357ce5b2d143..aa8b7f0e664c 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ModelClient.cs @@ -148,7 +148,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs index 37f41d119044..a57af8984382 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Name.cs @@ -242,19 +242,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value!.Value!, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 358f13e8de5f..49af3bbc0011 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -154,16 +154,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value!, pkiNotificationtestID.Value!.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs index 5bf7c08c2823..4c37377b8b56 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableClass.cs @@ -378,10 +378,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs index f768d56b98d9..650fa75d3470 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NullableShape.cs @@ -196,10 +196,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs index b051d11b1761..f3b39743e06c 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -148,7 +148,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index e041d875bc51..181ca33013a1 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -211,16 +211,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs index 5a9d1362547d..2a4479bb6892 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Order.cs @@ -343,22 +343,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs index 4a94f026f474..611702e0a740 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -188,13 +188,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs index 3cac06dda885..b5a9f269d06a 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ParentPet.cs @@ -121,10 +121,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs index 4e7c71f8a59d..2f834d4ad27e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pet.cs @@ -324,28 +324,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value!, photoUrls.Value!, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs index 5640fd1d9c8d..4e3ca083f0e0 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Pig.cs @@ -196,10 +196,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs index eabed88718f8..07a6da257acc 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -196,10 +196,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index ac2b8e61cd67..6da445395d9b 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -141,10 +141,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 8a93f3022a91..721f02f2e915 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -206,10 +206,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs index 599aa94d5e5e..b876a0dfebb4 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RequiredClass.cs @@ -2080,136 +2080,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value!.Value!, requiredNotnullableArrayOfString.Value!, requiredNotnullableBooleanProp.Value!.Value!, requiredNotnullableDatetimeProp.Value!.Value!, requiredNotnullableEnumInteger.Value!.Value!, requiredNotnullableEnumIntegerOnly.Value!.Value!, requiredNotnullableEnumString.Value!.Value!, requiredNotnullableOuterEnumDefaultValue.Value!.Value!, requiredNotnullableStringProp.Value!, requiredNotnullableUuid.Value!.Value!, requiredNotnullableintegerProp.Value!.Value!, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value!, requiredNullableBooleanProp.Value!, requiredNullableDateProp.Value!, requiredNullableDatetimeProp.Value!, requiredNullableEnumInteger.Value!, requiredNullableEnumIntegerOnly.Value!, requiredNullableEnumString.Value!, requiredNullableIntegerProp.Value!, requiredNullableOuterEnumDefaultValue.Value!, requiredNullableStringProp.Value!, requiredNullableUuid.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs index 5e2d71377d97..bbeabbb4a288 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Result.cs @@ -191,13 +191,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs index 36c27ec413ed..a939792e9831 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Return.cs @@ -194,19 +194,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value!, varAbstract.Value!, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs index bbaefb23e8b7..1dd908069a7d 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -168,10 +168,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index e292a138c48e..af7998bdab26 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -148,7 +148,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 9e866915b32f..fd5f5a3f6e69 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -154,16 +154,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value!, triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs index 4c152f2ef2fe..2a1135dcf33c 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Shape.cs @@ -196,10 +196,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs index 5aedd501c226..2d1a8d444eba 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -141,10 +141,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs index b18fbb1d936e..4ff352dcff8f 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -196,10 +196,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index e7ed21a8c3ca..7de7001d7e74 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -154,16 +154,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value!, shapeType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs index edf8a9edcacf..5d8916e01495 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -168,10 +168,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs index a5f86d17a002..9d3e01cfe13f 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Tag.cs @@ -168,10 +168,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index 508388831ad1..a77e39fb335a 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index cdd78842b091..fa3bdcca712c 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -148,7 +148,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs index 7410185d15aa..c55f09c24ad7 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -244,16 +244,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index 41fcb61c7c76..79f0d4ead06e 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -148,7 +148,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs index eee7fb7736e2..ed2c4f9b1ee4 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TestResult.cs @@ -190,13 +190,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs index 5e994d5c98e6..a136888f90d4 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Triangle.cs @@ -217,10 +217,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs index 20b576d5efbd..bacb230b71b7 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -141,10 +141,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value!); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/User.cs index 2589af030b24..66da53d722ec 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/User.cs @@ -373,31 +373,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs index a55ad54be20d..29ec64728866 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Whale.cs @@ -181,16 +181,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value!, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs index 143976f6b272..fa37280bcd17 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/Zebra.cs @@ -248,13 +248,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value!, type); } diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 733adac3c5c4..184ee862a155 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -221,7 +221,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs b/samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs index f8d7a66197ae..43cfd5298ad3 100644 --- a/samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs +++ b/samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate/src/Org.OpenAPITools/Model/NowGet200Response.cs @@ -169,10 +169,10 @@ public override NowGet200Response Read(ref Utf8JsonReader utf8JsonReader, Type t } if (now.IsSet && now.Value == null) - throw new ArgumentNullException(nameof(now), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: now."); if (today.IsSet && today.Value == null) - throw new ArgumentNullException(nameof(today), "Property is not nullable for class NowGet200Response."); + throw new JsonException("Property is not nullable for class NowGet200Response: today."); return new NowGet200Response(now, today); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs index 6ef65dc03490..99262aea8c59 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Activity.cs @@ -145,7 +145,7 @@ public override Activity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (activityOutputs.IsSet && activityOutputs.Value == null) - throw new ArgumentNullException(nameof(activityOutputs), "Property is not nullable for class Activity."); + throw new JsonException("Property is not nullable for class Activity: activity_outputs."); return new Activity(activityOutputs); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 0900bb21d987..03949c150021 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -165,10 +165,10 @@ public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader utf8 } if (prop1.IsSet && prop1.Value == null) - throw new ArgumentNullException(nameof(prop1), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop1."); if (prop2.IsSet && prop2.Value == null) - throw new ArgumentNullException(nameof(prop2), "Property is not nullable for class ActivityOutputElementRepresentation."); + throw new JsonException("Property is not nullable for class ActivityOutputElementRepresentation: prop2."); return new ActivityOutputElementRepresentation(prop1, prop2); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 1ea3cc6d6d13..326b04bfc736 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -286,25 +286,25 @@ public override AdditionalPropertiesClass Read(ref Utf8JsonReader utf8JsonReader } if (emptyMap.IsSet && emptyMap.Value == null) - throw new ArgumentNullException(nameof(emptyMap), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: empty_map."); if (mapOfMapProperty.IsSet && mapOfMapProperty.Value == null) - throw new ArgumentNullException(nameof(mapOfMapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_of_map_property."); if (mapProperty.IsSet && mapProperty.Value == null) - throw new ArgumentNullException(nameof(mapProperty), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_property."); if (mapWithUndeclaredPropertiesAnytype1.IsSet && mapWithUndeclaredPropertiesAnytype1.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype1), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_1."); if (mapWithUndeclaredPropertiesAnytype2.IsSet && mapWithUndeclaredPropertiesAnytype2.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype2), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_2."); if (mapWithUndeclaredPropertiesAnytype3.IsSet && mapWithUndeclaredPropertiesAnytype3.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesAnytype3), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_anytype_3."); if (mapWithUndeclaredPropertiesString.IsSet && mapWithUndeclaredPropertiesString.Value == null) - throw new ArgumentNullException(nameof(mapWithUndeclaredPropertiesString), "Property is not nullable for class AdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class AdditionalPropertiesClass: map_with_undeclared_properties_string."); return new AdditionalPropertiesClass(anytype1, emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs index af30b50b1efd..24bb80b1161e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Animal.cs @@ -175,13 +175,13 @@ public override Animal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Animal.", nameof(className)); + throw new JsonException("Property is required for class Animal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Animal."); + throw new JsonException("Property is not nullable for class Animal: color."); return new Animal(color); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs index 891117de444d..53bcd08ade21 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -185,13 +185,13 @@ public override ApiResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: code."); if (message.IsSet && message.Value == null) - throw new ArgumentNullException(nameof(message), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: message."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ApiResponse."); + throw new JsonException("Property is not nullable for class ApiResponse: type."); return new ApiResponse(code, message, type); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs index 415d977cb273..75cee1b3c300 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Apple.cs @@ -215,13 +215,13 @@ public override Apple Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (colorCode.IsSet && colorCode.Value == null) - throw new ArgumentNullException(nameof(colorCode), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: color_code."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: cultivar."); if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class Apple."); + throw new JsonException("Property is not nullable for class Apple: origin."); return new Apple(colorCode, cultivar, origin); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs index a8bb9970d266..3b78fca25fa6 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/AppleReq.cs @@ -151,13 +151,13 @@ public override AppleReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!cultivar.IsSet) - throw new ArgumentException("Property is required for class AppleReq.", nameof(cultivar)); + throw new JsonException("Property is required for class AppleReq: cultivar."); if (cultivar.IsSet && cultivar.Value == null) - throw new ArgumentNullException(nameof(cultivar), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: cultivar."); if (mealy.IsSet && mealy.Value == null) - throw new ArgumentNullException(nameof(mealy), "Property is not nullable for class AppleReq."); + throw new JsonException("Property is not nullable for class AppleReq: mealy."); return new AppleReq(cultivar.Value, mealy); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index cf982fbeaccc..a7dd1fab07e2 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, } if (arrayArrayNumber.IsSet && arrayArrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayArrayNumber), "Property is not nullable for class ArrayOfArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfArrayOfNumberOnly: ArrayArrayNumber."); return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9a0450a54939..977b54bc1746 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -145,7 +145,7 @@ public override ArrayOfNumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type t } if (arrayNumber.IsSet && arrayNumber.Value == null) - throw new ArgumentNullException(nameof(arrayNumber), "Property is not nullable for class ArrayOfNumberOnly."); + throw new JsonException("Property is not nullable for class ArrayOfNumberOnly: ArrayNumber."); return new ArrayOfNumberOnly(arrayNumber); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs index 946aa81707b4..083bb513576a 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -185,13 +185,13 @@ public override ArrayTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (arrayArrayOfInteger.IsSet && arrayArrayOfInteger.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfInteger), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_integer."); if (arrayArrayOfModel.IsSet && arrayArrayOfModel.Value == null) - throw new ArgumentNullException(nameof(arrayArrayOfModel), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_array_of_model."); if (arrayOfString.IsSet && arrayOfString.Value == null) - throw new ArgumentNullException(nameof(arrayOfString), "Property is not nullable for class ArrayTest."); + throw new JsonException("Property is not nullable for class ArrayTest: array_of_string."); return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs index 1963adefce90..f330f0454ebf 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Banana.cs @@ -145,7 +145,7 @@ public override Banana Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class Banana."); + throw new JsonException("Property is not nullable for class Banana: lengthCm."); return new Banana(lengthCm); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs index d88783cbab2d..b7bc9af9a97d 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BananaReq.cs @@ -151,13 +151,13 @@ public override BananaReq Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!lengthCm.IsSet) - throw new ArgumentException("Property is required for class BananaReq.", nameof(lengthCm)); + throw new JsonException("Property is required for class BananaReq: lengthCm."); if (lengthCm.IsSet && lengthCm.Value == null) - throw new ArgumentNullException(nameof(lengthCm), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: lengthCm."); if (sweet.IsSet && sweet.Value == null) - throw new ArgumentNullException(nameof(sweet), "Property is not nullable for class BananaReq."); + throw new JsonException("Property is not nullable for class BananaReq: sweet."); return new BananaReq(lengthCm.Value.Value, sweet); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs index da8a396dd208..bf65c1513d18 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/BasquePig.cs @@ -138,10 +138,10 @@ public override BasquePig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class BasquePig.", nameof(className)); + throw new JsonException("Property is required for class BasquePig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class BasquePig."); + throw new JsonException("Property is not nullable for class BasquePig: className."); return new BasquePig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs index 35fa5c799fe0..fd01e5b09eaf 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Capitalization.cs @@ -246,22 +246,22 @@ public override Capitalization Read(ref Utf8JsonReader utf8JsonReader, Type type } if (aTTNAME.IsSet && aTTNAME.Value == null) - throw new ArgumentNullException(nameof(aTTNAME), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: ATT_NAME."); if (capitalCamel.IsSet && capitalCamel.Value == null) - throw new ArgumentNullException(nameof(capitalCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: CapitalCamel."); if (capitalSnake.IsSet && capitalSnake.Value == null) - throw new ArgumentNullException(nameof(capitalSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: Capital_Snake."); if (sCAETHFlowPoints.IsSet && sCAETHFlowPoints.Value == null) - throw new ArgumentNullException(nameof(sCAETHFlowPoints), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: SCA_ETH_Flow_Points."); if (smallCamel.IsSet && smallCamel.Value == null) - throw new ArgumentNullException(nameof(smallCamel), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: smallCamel."); if (smallSnake.IsSet && smallSnake.Value == null) - throw new ArgumentNullException(nameof(smallSnake), "Property is not nullable for class Capitalization."); + throw new JsonException("Property is not nullable for class Capitalization: small_Snake."); return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs index dbf7d5878726..ea0441165f89 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Cat.cs @@ -138,16 +138,16 @@ public override Cat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Cat.", nameof(className)); + throw new JsonException("Property is required for class Cat: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: className."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: color."); if (declawed.IsSet && declawed.Value == null) - throw new ArgumentNullException(nameof(declawed), "Property is not nullable for class Cat."); + throw new JsonException("Property is not nullable for class Cat: declawed."); return new Cat(color, declawed); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs index c33db720faab..6dc2362cc48e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Category.cs @@ -158,13 +158,13 @@ public override Category Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!name.IsSet) - throw new ArgumentException("Property is required for class Category.", nameof(name)); + throw new JsonException("Property is required for class Category: name."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Category."); + throw new JsonException("Property is not nullable for class Category: name."); return new Category(id, name.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs index 0df505327662..f14bc54e1086 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ChildCat.cs @@ -200,13 +200,13 @@ public override ChildCat Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ChildCat.", nameof(petType)); + throw new JsonException("Property is required for class ChildCat: pet_type."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: name."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ChildCat."); + throw new JsonException("Property is not nullable for class ChildCat: pet_type."); return new ChildCat(name); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs index 2cec4e3ee767..62e448309893 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ClassModel.cs @@ -145,7 +145,7 @@ public override ClassModel Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class ClassModel."); + throw new JsonException("Property is not nullable for class ClassModel: _class."); return new ClassModel(varClass); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 71f28630fcd3..9f1ccf82a8cc 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -151,16 +151,16 @@ public override ComplexQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Typ } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ComplexQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class ComplexQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ComplexQuadrilateral."); + throw new JsonException("Property is not nullable for class ComplexQuadrilateral: shapeType."); return new ComplexQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs index 790b30d0598c..fad896e8c944 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/CopyActivity.cs @@ -193,16 +193,16 @@ public override CopyActivity Read(ref Utf8JsonReader utf8JsonReader, Type typeTo } if (!copyActivitytt.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(copyActivitytt)); + throw new JsonException("Property is required for class CopyActivity: copyActivitytt."); if (!schema.IsSet) - throw new ArgumentException("Property is required for class CopyActivity.", nameof(schema)); + throw new JsonException("Property is required for class CopyActivity: $schema."); if (copyActivitytt.IsSet && copyActivitytt.Value == null) - throw new ArgumentNullException(nameof(copyActivitytt), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: copyActivitytt."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class CopyActivity."); + throw new JsonException("Property is not nullable for class CopyActivity: $schema."); return new CopyActivity(copyActivitytt.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs index 36182d9cbb8e..e3acfad07f60 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DanishPig.cs @@ -138,10 +138,10 @@ public override DanishPig Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!className.IsSet) - throw new ArgumentException("Property is required for class DanishPig.", nameof(className)); + throw new JsonException("Property is required for class DanishPig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class DanishPig."); + throw new JsonException("Property is not nullable for class DanishPig: className."); return new DanishPig(className.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs index f272f800a65b..b4f039671025 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DateOnlyClass.cs @@ -151,7 +151,7 @@ public override DateOnlyClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (dateOnlyProperty.IsSet && dateOnlyProperty.Value == null) - throw new ArgumentNullException(nameof(dateOnlyProperty), "Property is not nullable for class DateOnlyClass."); + throw new JsonException("Property is not nullable for class DateOnlyClass: dateOnlyProperty."); return new DateOnlyClass(dateOnlyProperty); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs index 5b795e143682..de7a0f313660 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -145,7 +145,7 @@ public override DeprecatedObject Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class DeprecatedObject."); + throw new JsonException("Property is not nullable for class DeprecatedObject: name."); return new DeprecatedObject(name); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs index 00e11bca0df2..ef4fa867e899 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant1.cs @@ -138,22 +138,22 @@ public override Descendant1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant1: alternativeName."); if (!descendantName.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(descendantName)); + throw new JsonException("Property is required for class Descendant1: descendantName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant1.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant1: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: alternativeName."); if (descendantName.IsSet && descendantName.Value == null) - throw new ArgumentNullException(nameof(descendantName), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: descendantName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant1."); + throw new JsonException("Property is not nullable for class Descendant1: objectType."); return new Descendant1(alternativeName.Value, descendantName.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs index 3ad11787dcb3..d83152dfa6b7 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Descendant2.cs @@ -138,22 +138,22 @@ public override Descendant2 Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(alternativeName)); + throw new JsonException("Property is required for class Descendant2: alternativeName."); if (!confidentiality.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(confidentiality)); + throw new JsonException("Property is required for class Descendant2: confidentiality."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class Descendant2.", nameof(objectType)); + throw new JsonException("Property is required for class Descendant2: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: alternativeName."); if (confidentiality.IsSet && confidentiality.Value == null) - throw new ArgumentNullException(nameof(confidentiality), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: confidentiality."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class Descendant2."); + throw new JsonException("Property is not nullable for class Descendant2: objectType."); return new Descendant2(alternativeName.Value, confidentiality.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs index 8f43963d5b4f..e076e9c9525e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Dog.cs @@ -138,16 +138,16 @@ public override Dog Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Dog.", nameof(className)); + throw new JsonException("Property is required for class Dog: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: className."); if (breed.IsSet && breed.Value == null) - throw new ArgumentNullException(nameof(breed), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: breed."); if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Dog."); + throw new JsonException("Property is not nullable for class Dog: color."); return new Dog(breed, color); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs index 2bf745f2f7d4..2aa9413a0cfb 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Drawing.cs @@ -205,10 +205,10 @@ public override Drawing Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (mainShape.IsSet && mainShape.Value == null) - throw new ArgumentNullException(nameof(mainShape), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: mainShape."); if (shapes.IsSet && shapes.Value == null) - throw new ArgumentNullException(nameof(shapes), "Property is not nullable for class Drawing."); + throw new JsonException("Property is not nullable for class Drawing: shapes."); return new Drawing(mainShape, nullableShape, shapeOrNull, shapes); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs index c7187fd04841..3b32946bb5b9 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EntityBase.cs @@ -152,10 +152,10 @@ public override EntityBase Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!schema.IsSet) - throw new ArgumentException("Property is required for class EntityBase.", nameof(schema)); + throw new JsonException("Property is required for class EntityBase: $schema."); if (schema.IsSet && schema.Value == null) - throw new ArgumentNullException(nameof(schema), "Property is not nullable for class EntityBase."); + throw new JsonException("Property is not nullable for class EntityBase: $schema."); return new EntityBase(); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs index 75fc3819ecf1..bb1e852f9e73 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -304,10 +304,10 @@ public override EnumArrays Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (arrayEnum.IsSet && arrayEnum.Value == null) - throw new ArgumentNullException(nameof(arrayEnum), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: array_enum."); if (justSymbol.IsSet && justSymbol.Value == null) - throw new ArgumentNullException(nameof(justSymbol), "Property is not nullable for class EnumArrays."); + throw new JsonException("Property is not nullable for class EnumArrays: just_symbol."); return new EnumArrays(arrayEnum, justSymbol); } 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 bd1502d4326b..41c51e61b129 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 @@ -822,31 +822,31 @@ public override EnumTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!enumStringRequired.IsSet) - throw new ArgumentException("Property is required for class EnumTest.", nameof(enumStringRequired)); + throw new JsonException("Property is required for class EnumTest: enum_string_required."); if (enumStringRequired.IsSet && enumStringRequired.Value == null) - throw new ArgumentNullException(nameof(enumStringRequired), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string_required."); if (enumInteger.IsSet && enumInteger.Value == null) - throw new ArgumentNullException(nameof(enumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer."); if (enumIntegerOnly.IsSet && enumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(enumIntegerOnly), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_integer_only."); if (enumNumber.IsSet && enumNumber.Value == null) - throw new ArgumentNullException(nameof(enumNumber), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_number."); if (enumString.IsSet && enumString.Value == null) - throw new ArgumentNullException(nameof(enumString), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: enum_string."); if (outerEnumDefaultValue.IsSet && outerEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumDefaultValue."); if (outerEnumInteger.IsSet && outerEnumInteger.Value == null) - throw new ArgumentNullException(nameof(outerEnumInteger), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumInteger."); if (outerEnumIntegerDefaultValue.IsSet && outerEnumIntegerDefaultValue.Value == null) - throw new ArgumentNullException(nameof(outerEnumIntegerDefaultValue), "Property is not nullable for class EnumTest."); + throw new JsonException("Property is not nullable for class EnumTest: outerEnumIntegerDefaultValue."); return new EnumTest(enumStringRequired.Value.Value, enumInteger, enumIntegerOnly, enumNumber, enumString, outerEnum, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 6945fabbfb86..665b265fe8b5 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -151,16 +151,16 @@ public override EquilateralTriangle Read(ref Utf8JsonReader utf8JsonReader, Type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class EquilateralTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class EquilateralTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class EquilateralTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class EquilateralTriangle."); + throw new JsonException("Property is not nullable for class EquilateralTriangle: triangleType."); return new EquilateralTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs index f3b89016ca8c..159542d8f5fa 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/File.cs @@ -146,7 +146,7 @@ public override File Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (sourceURI.IsSet && sourceURI.Value == null) - throw new ArgumentNullException(nameof(sourceURI), "Property is not nullable for class File."); + throw new JsonException("Property is not nullable for class File: sourceURI."); return new File(sourceURI); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 70c50972598e..d9dd4b26705c 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -165,10 +165,10 @@ public override FileSchemaTestClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (file.IsSet && file.Value == null) - throw new ArgumentNullException(nameof(file), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: file."); if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class FileSchemaTestClass."); + throw new JsonException("Property is not nullable for class FileSchemaTestClass: files."); return new FileSchemaTestClass(file, files); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs index 0bde70e7d10c..a631d8e2d18a 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Foo.cs @@ -145,7 +145,7 @@ public override Foo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class Foo."); + throw new JsonException("Property is not nullable for class Foo: bar."); return new Foo(bar); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 6f6db2d948a2..1bbcb2be323c 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -145,7 +145,7 @@ public override FooGetDefaultResponse Read(ref Utf8JsonReader utf8JsonReader, Ty } if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FooGetDefaultResponse."); + throw new JsonException("Property is not nullable for class FooGetDefaultResponse: string."); return new FooGetDefaultResponse(varString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs index b16df5f518e0..30fe9ab86ca4 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs @@ -826,103 +826,103 @@ public override FormatTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (!varByte.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(varByte)); + throw new JsonException("Property is required for class FormatTest: byte."); if (!date.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(date)); + throw new JsonException("Property is required for class FormatTest: date."); if (!number.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(number)); + throw new JsonException("Property is required for class FormatTest: number."); if (!password.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(password)); + throw new JsonException("Property is required for class FormatTest: password."); if (!stringFormattedAsDecimalRequired.IsSet) - throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired)); + throw new JsonException("Property is required for class FormatTest: string_formatted_as_decimal_required."); if (varByte.IsSet && varByte.Value == null) - throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: byte."); if (date.IsSet && date.Value == null) - throw new ArgumentNullException(nameof(date), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: date."); if (number.IsSet && number.Value == null) - throw new ArgumentNullException(nameof(number), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: number."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: password."); if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal_required."); if (binary.IsSet && binary.Value == null) - throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: binary."); if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: dateTime."); if (varDecimal.IsSet && varDecimal.Value == null) - throw new ArgumentNullException(nameof(varDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: decimal."); if (varDouble.IsSet && varDouble.Value == null) - throw new ArgumentNullException(nameof(varDouble), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: double."); if (duplicatePropertyName2.IsSet && duplicatePropertyName2.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName2), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: duplicate_property_name."); if (duplicatePropertyName.IsSet && duplicatePropertyName.Value == null) - throw new ArgumentNullException(nameof(duplicatePropertyName), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: @duplicate_property_name."); if (varFloat.IsSet && varFloat.Value == null) - throw new ArgumentNullException(nameof(varFloat), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: float."); if (int32.IsSet && int32.Value == null) - throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32."); if (int32Range.IsSet && int32Range.Value == null) - throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int32Range."); if (int64.IsSet && int64.Value == null) - throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64."); if (int64Negative.IsSet && int64Negative.Value == null) - throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Negative."); if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null) - throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64NegativeExclusive."); if (int64Positive.IsSet && int64Positive.Value == null) - throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64Positive."); if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null) - throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: int64PositiveExclusive."); if (integer.IsSet && integer.Value == null) - throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: integer."); if (patternWithBackslash.IsSet && patternWithBackslash.Value == null) - throw new ArgumentNullException(nameof(patternWithBackslash), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_backslash."); if (patternWithDigits.IsSet && patternWithDigits.Value == null) - throw new ArgumentNullException(nameof(patternWithDigits), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits."); if (patternWithDigitsAndDelimiter.IsSet && patternWithDigitsAndDelimiter.Value == null) - throw new ArgumentNullException(nameof(patternWithDigitsAndDelimiter), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: pattern_with_digits_and_delimiter."); if (varString.IsSet && varString.Value == null) - throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string."); if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null) - throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: string_formatted_as_decimal."); if (unsignedInteger.IsSet && unsignedInteger.Value == null) - throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_integer."); if (unsignedLong.IsSet && unsignedLong.Value == null) - throw new ArgumentNullException(nameof(unsignedLong), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: unsigned_long."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest."); + throw new JsonException("Property is not nullable for class FormatTest: uuid."); return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, duplicatePropertyName2, duplicatePropertyName, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs index e6781b1c920b..d1a64f42f03b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Fruit.cs @@ -183,7 +183,7 @@ public override Fruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class Fruit."); + throw new JsonException("Property is not nullable for class Fruit: color."); if (apple != null) return new Fruit(apple, color); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs index 2df46dde14c4..8d572546f439 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GmFruit.cs @@ -187,7 +187,7 @@ public override GmFruit Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (color.IsSet && color.Value == null) - throw new ArgumentNullException(nameof(color), "Property is not nullable for class GmFruit."); + throw new JsonException("Property is not nullable for class GmFruit: color."); Option appleParsedValue = apple == null ? default diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index 98b7ec6c5479..7496855fdf41 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -155,10 +155,10 @@ public override GrandparentAnimal Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!petType.IsSet) - throw new ArgumentException("Property is required for class GrandparentAnimal.", nameof(petType)); + throw new JsonException("Property is required for class GrandparentAnimal: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class GrandparentAnimal."); + throw new JsonException("Property is not nullable for class GrandparentAnimal: pet_type."); return new GrandparentAnimal(); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 925dfb5ff515..7ed6d4990ae9 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -206,10 +206,10 @@ public override HasOnlyReadOnly Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: bar."); if (foo.IsSet && foo.Value == null) - throw new ArgumentNullException(nameof(foo), "Property is not nullable for class HasOnlyReadOnly."); + throw new JsonException("Property is not nullable for class HasOnlyReadOnly: foo."); return new HasOnlyReadOnly(bar, foo); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs index 4655c9cbb01e..c3b0e495f381 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/InjectedVendorExtensionsTest.cs @@ -292,22 +292,22 @@ public override InjectedVendorExtensionsTest Read(ref Utf8JsonReader utf8JsonRea } if (potentiallyOverriddenPropertyAccessor.IsSet && potentiallyOverriddenPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyAccessor."); if (potentiallyOverriddenPropertyToInternal.IsSet && potentiallyOverriddenPropertyToInternal.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToInternal), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToInternal."); if (potentiallyOverriddenPropertyToPrivate.IsSet && potentiallyOverriddenPropertyToPrivate.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPrivate), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPrivate."); if (potentiallyOverriddenPropertyToPublic.IsSet && potentiallyOverriddenPropertyToPublic.Value == null) - throw new ArgumentNullException(nameof(potentiallyOverriddenPropertyToPublic), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: potentiallyOverriddenPropertyToPublic."); if (unalteredProperty.IsSet && unalteredProperty.Value == null) - throw new ArgumentNullException(nameof(unalteredProperty), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredProperty."); if (unalteredPropertyAccessor.IsSet && unalteredPropertyAccessor.Value == null) - throw new ArgumentNullException(nameof(unalteredPropertyAccessor), "Property is not nullable for class InjectedVendorExtensionsTest."); + throw new JsonException("Property is not nullable for class InjectedVendorExtensionsTest: unalteredPropertyAccessor."); return new InjectedVendorExtensionsTest(potentiallyOverriddenPropertyAccessor, potentiallyOverriddenPropertyToInternal, potentiallyOverriddenPropertyToPrivate, potentiallyOverriddenPropertyToPublic, unalteredProperty, unalteredPropertyAccessor); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index 9e34531ab9ba..2329eea4f42b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -144,16 +144,16 @@ public override IsoscelesTriangle Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class IsoscelesTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class IsoscelesTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class IsoscelesTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class IsoscelesTriangle."); + throw new JsonException("Property is not nullable for class IsoscelesTriangle: triangleType."); return new IsoscelesTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs index 0ba836f7be5f..eef51661c9d7 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/List.cs @@ -145,7 +145,7 @@ public override List Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (var123List.IsSet && var123List.Value == null) - throw new ArgumentNullException(nameof(var123List), "Property is not nullable for class List."); + throw new JsonException("Property is not nullable for class List: 123-list."); return new List(var123List); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs index 4e22fe711e2a..0ca2db559ebe 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/LiteralStringClass.cs @@ -165,10 +165,10 @@ public override LiteralStringClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (escapedLiteralString.IsSet && escapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(escapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: escapedLiteralString."); if (unescapedLiteralString.IsSet && unescapedLiteralString.Value == null) - throw new ArgumentNullException(nameof(unescapedLiteralString), "Property is not nullable for class LiteralStringClass."); + throw new JsonException("Property is not nullable for class LiteralStringClass: unescapedLiteralString."); return new LiteralStringClass(escapedLiteralString, unescapedLiteralString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs index 9bc6bbaaf9b9..c4acb8c9c9bd 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Mammal.cs @@ -214,10 +214,10 @@ public override Mammal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!className.IsSet) - throw new ArgumentException("Property is required for class Mammal.", nameof(className)); + throw new JsonException("Property is required for class Mammal: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Mammal."); + throw new JsonException("Property is not nullable for class Mammal: className."); if (pig != null) return new Mammal(pig); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs index c216c04d6468..fda445a67fcd 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MapTest.cs @@ -271,16 +271,16 @@ public override MapTest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConve } if (directMap.IsSet && directMap.Value == null) - throw new ArgumentNullException(nameof(directMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: direct_map."); if (indirectMap.IsSet && indirectMap.Value == null) - throw new ArgumentNullException(nameof(indirectMap), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: indirect_map."); if (mapMapOfString.IsSet && mapMapOfString.Value == null) - throw new ArgumentNullException(nameof(mapMapOfString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_map_of_string."); if (mapOfEnumString.IsSet && mapOfEnumString.Value == null) - throw new ArgumentNullException(nameof(mapOfEnumString), "Property is not nullable for class MapTest."); + throw new JsonException("Property is not nullable for class MapTest: map_of_enum_string."); return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs index 90526549ac2b..02b04b791e8e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedAnyOf.cs @@ -145,7 +145,7 @@ public override MixedAnyOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedAnyOf."); + throw new JsonException("Property is not nullable for class MixedAnyOf: content."); return new MixedAnyOf(content); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs index 2376786bd50e..40618643e1b0 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedOneOf.cs @@ -145,7 +145,7 @@ public override MixedOneOf Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (content.IsSet && content.Value == null) - throw new ArgumentNullException(nameof(content), "Property is not nullable for class MixedOneOf."); + throw new JsonException("Property is not nullable for class MixedOneOf: content."); return new MixedOneOf(content); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index d406287f4039..ea319b6748e3 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -217,16 +217,16 @@ public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonRea } if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: dateTime."); if (map.IsSet && map.Value == null) - throw new ArgumentNullException(nameof(map), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: map."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid."); if (uuidWithPattern.IsSet && uuidWithPattern.Value == null) - throw new ArgumentNullException(nameof(uuidWithPattern), "Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass."); + throw new JsonException("Property is not nullable for class MixedPropertiesAndAdditionalPropertiesClass: uuid_with_pattern."); return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid, uuidWithPattern); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs index 2220371abceb..87e11e6999e3 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/MixedSubId.cs @@ -145,7 +145,7 @@ public override MixedSubId Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class MixedSubId."); + throw new JsonException("Property is not nullable for class MixedSubId: id."); return new MixedSubId(id); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs index 09990a706a8c..d9971e56423d 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Model200Response.cs @@ -165,10 +165,10 @@ public override Model200Response Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: class."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Model200Response."); + throw new JsonException("Property is not nullable for class Model200Response: name."); return new Model200Response(varClass, name); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs index 64b5da999734..429d211bd3f2 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ModelClient.cs @@ -145,7 +145,7 @@ public override ModelClient Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (varClient.IsSet && varClient.Value == null) - throw new ArgumentNullException(nameof(varClient), "Property is not nullable for class ModelClient."); + throw new JsonException("Property is not nullable for class ModelClient: client."); return new ModelClient(varClient); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs index f657f42be0ab..8d1f2aeb0db8 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Name.cs @@ -239,19 +239,19 @@ public override Name Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!varName.IsSet) - throw new ArgumentException("Property is required for class Name.", nameof(varName)); + throw new JsonException("Property is required for class Name: name."); if (varName.IsSet && varName.Value == null) - throw new ArgumentNullException(nameof(varName), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: name."); if (property.IsSet && property.Value == null) - throw new ArgumentNullException(nameof(property), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: property."); if (snakeCase.IsSet && snakeCase.Value == null) - throw new ArgumentNullException(nameof(snakeCase), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: snake_case."); if (var123Number.IsSet && var123Number.Value == null) - throw new ArgumentNullException(nameof(var123Number), "Property is not nullable for class Name."); + throw new JsonException("Property is not nullable for class Name: 123Number."); return new Name(varName.Value.Value, property, snakeCase, var123Number); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs index 2858e8d86e69..883b72447c75 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NotificationtestGetElementsV1ResponseMPayload.cs @@ -151,16 +151,16 @@ public override NotificationtestGetElementsV1ResponseMPayload Read(ref Utf8JsonR } if (!aObjVariableobject.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(aObjVariableobject)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (!pkiNotificationtestID.IsSet) - throw new ArgumentException("Property is required for class NotificationtestGetElementsV1ResponseMPayload.", nameof(pkiNotificationtestID)); + throw new JsonException("Property is required for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); if (aObjVariableobject.IsSet && aObjVariableobject.Value == null) - throw new ArgumentNullException(nameof(aObjVariableobject), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: a_objVariableobject."); if (pkiNotificationtestID.IsSet && pkiNotificationtestID.Value == null) - throw new ArgumentNullException(nameof(pkiNotificationtestID), "Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload."); + throw new JsonException("Property is not nullable for class NotificationtestGetElementsV1ResponseMPayload: pkiNotificationtestID."); return new NotificationtestGetElementsV1ResponseMPayload(aObjVariableobject.Value, pkiNotificationtestID.Value.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs index ba9cfa507092..dd795c454755 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableClass.cs @@ -375,10 +375,10 @@ public override NullableClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (arrayItemsNullable.IsSet && arrayItemsNullable.Value == null) - throw new ArgumentNullException(nameof(arrayItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: array_items_nullable."); if (objectItemsNullable.IsSet && objectItemsNullable.Value == null) - throw new ArgumentNullException(nameof(objectItemsNullable), "Property is not nullable for class NullableClass."); + throw new JsonException("Property is not nullable for class NullableClass: object_items_nullable."); return new NullableClass(arrayAndItemsNullableProp, arrayItemsNullable, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectItemsNullable, objectNullableProp, stringProp); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs index dd205b2df274..dcbb486a9920 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NullableShape.cs @@ -193,10 +193,10 @@ public override NullableShape Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class NullableShape.", nameof(shapeType)); + throw new JsonException("Property is required for class NullableShape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class NullableShape."); + throw new JsonException("Property is not nullable for class NullableShape: shapeType."); if (quadrilateral != null) return new NullableShape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs index 209be6be1047..f9c0e035e424 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -145,7 +145,7 @@ public override NumberOnly Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (justNumber.IsSet && justNumber.Value == null) - throw new ArgumentNullException(nameof(justNumber), "Property is not nullable for class NumberOnly."); + throw new JsonException("Property is not nullable for class NumberOnly: JustNumber."); return new NumberOnly(justNumber); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 7881bc48f66e..1cf2977d186e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -208,16 +208,16 @@ public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader utf8JsonReade } if (bars.IsSet && bars.Value == null) - throw new ArgumentNullException(nameof(bars), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: bars."); if (deprecatedRef.IsSet && deprecatedRef.Value == null) - throw new ArgumentNullException(nameof(deprecatedRef), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: deprecatedRef."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: id."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class ObjectWithDeprecatedFields."); + throw new JsonException("Property is not nullable for class ObjectWithDeprecatedFields: uuid."); return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs index 4d4a6167efc2..610909884b0f 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Order.cs @@ -340,22 +340,22 @@ public override Order Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (complete.IsSet && complete.Value == null) - throw new ArgumentNullException(nameof(complete), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: complete."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: id."); if (petId.IsSet && petId.Value == null) - throw new ArgumentNullException(nameof(petId), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: petId."); if (quantity.IsSet && quantity.Value == null) - throw new ArgumentNullException(nameof(quantity), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: quantity."); if (shipDate.IsSet && shipDate.Value == null) - throw new ArgumentNullException(nameof(shipDate), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: shipDate."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Order."); + throw new JsonException("Property is not nullable for class Order: status."); return new Order(complete, id, petId, quantity, shipDate, status); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs index 448c538f19d8..99b0abbaa0f5 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -185,13 +185,13 @@ public override OuterComposite Read(ref Utf8JsonReader utf8JsonReader, Type type } if (myBoolean.IsSet && myBoolean.Value == null) - throw new ArgumentNullException(nameof(myBoolean), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_boolean."); if (myNumber.IsSet && myNumber.Value == null) - throw new ArgumentNullException(nameof(myNumber), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_number."); if (myString.IsSet && myString.Value == null) - throw new ArgumentNullException(nameof(myString), "Property is not nullable for class OuterComposite."); + throw new JsonException("Property is not nullable for class OuterComposite: my_string."); return new OuterComposite(myBoolean, myNumber, myString); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs index f268a60b3dcd..a5c2a2f12ef1 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ParentPet.cs @@ -118,10 +118,10 @@ public override ParentPet Read(ref Utf8JsonReader utf8JsonReader, Type typeToCon } if (!petType.IsSet) - throw new ArgumentException("Property is required for class ParentPet.", nameof(petType)); + throw new JsonException("Property is required for class ParentPet: pet_type."); if (petType.IsSet && petType.Value == null) - throw new ArgumentNullException(nameof(petType), "Property is not nullable for class ParentPet."); + throw new JsonException("Property is not nullable for class ParentPet: pet_type."); return new ParentPet(); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs index d8bb45eae944..33a3d6dece38 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pet.cs @@ -321,28 +321,28 @@ public override Pet Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!name.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(name)); + throw new JsonException("Property is required for class Pet: name."); if (!photoUrls.IsSet) - throw new ArgumentException("Property is required for class Pet.", nameof(photoUrls)); + throw new JsonException("Property is required for class Pet: photoUrls."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: name."); if (photoUrls.IsSet && photoUrls.Value == null) - throw new ArgumentNullException(nameof(photoUrls), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: photoUrls."); if (category.IsSet && category.Value == null) - throw new ArgumentNullException(nameof(category), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: category."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: id."); if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: status."); if (tags.IsSet && tags.Value == null) - throw new ArgumentNullException(nameof(tags), "Property is not nullable for class Pet."); + throw new JsonException("Property is not nullable for class Pet: tags."); return new Pet(name.Value, photoUrls.Value, category, id, status, tags); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs index 3d7b78a18292..8922e573ab0f 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Pig.cs @@ -193,10 +193,10 @@ public override Pig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (!className.IsSet) - throw new ArgumentException("Property is required for class Pig.", nameof(className)); + throw new JsonException("Property is required for class Pig: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Pig."); + throw new JsonException("Property is not nullable for class Pig: className."); if (basquePig != null) return new Pig(basquePig); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs index f1b8095c949f..bb695bd00b79 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -193,10 +193,10 @@ public override Quadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class Quadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class Quadrilateral: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class Quadrilateral."); + throw new JsonException("Property is not nullable for class Quadrilateral: quadrilateralType."); if (complexQuadrilateral != null) return new Quadrilateral(complexQuadrilateral); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 790693a4ee03..8d7a57c59526 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -138,10 +138,10 @@ public override QuadrilateralInterface Read(ref Utf8JsonReader utf8JsonReader, T } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class QuadrilateralInterface.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class QuadrilateralInterface: quadrilateralType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class QuadrilateralInterface."); + throw new JsonException("Property is not nullable for class QuadrilateralInterface: quadrilateralType."); return new QuadrilateralInterface(quadrilateralType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 6c679f4eadf0..3fbd226849a8 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -203,10 +203,10 @@ public override ReadOnlyFirst Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (bar.IsSet && bar.Value == null) - throw new ArgumentNullException(nameof(bar), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: bar."); if (baz.IsSet && baz.Value == null) - throw new ArgumentNullException(nameof(baz), "Property is not nullable for class ReadOnlyFirst."); + throw new JsonException("Property is not nullable for class ReadOnlyFirst: baz."); return new ReadOnlyFirst(bar, baz); } 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 a5e6b6f451b2..fae1bd2034ce 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 @@ -2077,136 +2077,136 @@ public override RequiredClass Read(ref Utf8JsonReader utf8JsonReader, Type typeT } if (!requiredNotNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_not_nullable_date_prop."); if (!requiredNotnullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_array_of_string."); if (!requiredNotnullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_boolean_prop."); if (!requiredNotnullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_datetime_prop."); if (!requiredNotnullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer."); if (!requiredNotnullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_integer_only."); if (!requiredNotnullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_enum_string."); if (!requiredNotnullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (!requiredNotnullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_string_prop."); if (!requiredNotnullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_notnullable_uuid."); if (!requiredNotnullableintegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNotnullableintegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_notnullableinteger_prop."); if (!requiredNullableArrayOfString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableArrayOfString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_array_of_string."); if (!requiredNullableBooleanProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableBooleanProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_boolean_prop."); if (!requiredNullableDateProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDateProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_date_prop."); if (!requiredNullableDatetimeProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableDatetimeProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_datetime_prop."); if (!requiredNullableEnumInteger.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumInteger)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer."); if (!requiredNullableEnumIntegerOnly.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumIntegerOnly)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_integer_only."); if (!requiredNullableEnumString.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableEnumString)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_enum_string."); if (!requiredNullableIntegerProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableIntegerProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_integer_prop."); if (!requiredNullableOuterEnumDefaultValue.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableOuterEnumDefaultValue)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_outerEnumDefaultValue."); if (!requiredNullableStringProp.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableStringProp)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_string_prop."); if (!requiredNullableUuid.IsSet) - throw new ArgumentException("Property is required for class RequiredClass.", nameof(requiredNullableUuid)); + throw new JsonException("Property is required for class RequiredClass: required_nullable_uuid."); if (requiredNotNullableDateProp.IsSet && requiredNotNullableDateProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotNullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_not_nullable_date_prop."); if (requiredNotnullableArrayOfString.IsSet && requiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_array_of_string."); if (requiredNotnullableBooleanProp.IsSet && requiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_boolean_prop."); if (requiredNotnullableDatetimeProp.IsSet && requiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_datetime_prop."); if (requiredNotnullableEnumInteger.IsSet && requiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer."); if (requiredNotnullableEnumIntegerOnly.IsSet && requiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_integer_only."); if (requiredNotnullableEnumString.IsSet && requiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_enum_string."); if (requiredNotnullableOuterEnumDefaultValue.IsSet && requiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_outerEnumDefaultValue."); if (requiredNotnullableStringProp.IsSet && requiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_string_prop."); if (requiredNotnullableUuid.IsSet && requiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullable_uuid."); if (requiredNotnullableintegerProp.IsSet && requiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(requiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: required_notnullableinteger_prop."); if (notRequiredNotnullableDateProp.IsSet && notRequiredNotnullableDateProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableDateProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullable_date_prop."); if (notRequiredNotnullableintegerProp.IsSet && notRequiredNotnullableintegerProp.Value == null) - throw new ArgumentNullException(nameof(notRequiredNotnullableintegerProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: not_required_notnullableinteger_prop."); if (notrequiredNotnullableArrayOfString.IsSet && notrequiredNotnullableArrayOfString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableArrayOfString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_array_of_string."); if (notrequiredNotnullableBooleanProp.IsSet && notrequiredNotnullableBooleanProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableBooleanProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_boolean_prop."); if (notrequiredNotnullableDatetimeProp.IsSet && notrequiredNotnullableDatetimeProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableDatetimeProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_datetime_prop."); if (notrequiredNotnullableEnumInteger.IsSet && notrequiredNotnullableEnumInteger.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumInteger), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer."); if (notrequiredNotnullableEnumIntegerOnly.IsSet && notrequiredNotnullableEnumIntegerOnly.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumIntegerOnly), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_integer_only."); if (notrequiredNotnullableEnumString.IsSet && notrequiredNotnullableEnumString.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableEnumString), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_enum_string."); if (notrequiredNotnullableOuterEnumDefaultValue.IsSet && notrequiredNotnullableOuterEnumDefaultValue.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableOuterEnumDefaultValue), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_outerEnumDefaultValue."); if (notrequiredNotnullableStringProp.IsSet && notrequiredNotnullableStringProp.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableStringProp), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_string_prop."); if (notrequiredNotnullableUuid.IsSet && notrequiredNotnullableUuid.Value == null) - throw new ArgumentNullException(nameof(notrequiredNotnullableUuid), "Property is not nullable for class RequiredClass."); + throw new JsonException("Property is not nullable for class RequiredClass: notrequired_notnullable_uuid."); return new RequiredClass(requiredNotNullableDateProp.Value.Value, requiredNotnullableArrayOfString.Value, requiredNotnullableBooleanProp.Value.Value, requiredNotnullableDatetimeProp.Value.Value, requiredNotnullableEnumInteger.Value.Value, requiredNotnullableEnumIntegerOnly.Value.Value, requiredNotnullableEnumString.Value.Value, requiredNotnullableOuterEnumDefaultValue.Value.Value, requiredNotnullableStringProp.Value, requiredNotnullableUuid.Value.Value, requiredNotnullableintegerProp.Value.Value, notRequiredNotnullableDateProp, notRequiredNotnullableintegerProp, notRequiredNullableDateProp, notRequiredNullableIntegerProp, notrequiredNotnullableArrayOfString, notrequiredNotnullableBooleanProp, notrequiredNotnullableDatetimeProp, notrequiredNotnullableEnumInteger, notrequiredNotnullableEnumIntegerOnly, notrequiredNotnullableEnumString, notrequiredNotnullableOuterEnumDefaultValue, notrequiredNotnullableStringProp, notrequiredNotnullableUuid, notrequiredNullableArrayOfString, notrequiredNullableBooleanProp, notrequiredNullableDatetimeProp, notrequiredNullableEnumInteger, notrequiredNullableEnumIntegerOnly, notrequiredNullableEnumString, notrequiredNullableOuterEnumDefaultValue, notrequiredNullableStringProp, notrequiredNullableUuid, requiredNullableArrayOfString.Value, requiredNullableBooleanProp.Value, requiredNullableDateProp.Value, requiredNullableDatetimeProp.Value, requiredNullableEnumInteger.Value, requiredNullableEnumIntegerOnly.Value, requiredNullableEnumString.Value, requiredNullableIntegerProp.Value, requiredNullableOuterEnumDefaultValue.Value, requiredNullableStringProp.Value, requiredNullableUuid.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Result.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Result.cs index 7ed1ea210629..533d484093fd 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Result.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Result.cs @@ -188,13 +188,13 @@ public override Result Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class Result."); + throw new JsonException("Property is not nullable for class Result: uuid."); return new Result(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs index 6870e58a4e5b..c44b71b7659b 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Return.cs @@ -191,19 +191,19 @@ public override Return Read(ref Utf8JsonReader utf8JsonReader, Type typeToConver } if (!varLock.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varLock)); + throw new JsonException("Property is required for class Return: lock."); if (!varAbstract.IsSet) - throw new ArgumentException("Property is required for class Return.", nameof(varAbstract)); + throw new JsonException("Property is required for class Return: abstract."); if (varLock.IsSet && varLock.Value == null) - throw new ArgumentNullException(nameof(varLock), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: lock."); if (varReturn.IsSet && varReturn.Value == null) - throw new ArgumentNullException(nameof(varReturn), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: return."); if (varUnsafe.IsSet && varUnsafe.Value == null) - throw new ArgumentNullException(nameof(varUnsafe), "Property is not nullable for class Return."); + throw new JsonException("Property is not nullable for class Return: unsafe."); return new Return(varLock.Value, varAbstract.Value, varReturn, varUnsafe); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs index 88ac872eba81..455206911cd3 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHash.cs @@ -165,10 +165,10 @@ public override RolesReportsHash Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (role.IsSet && role.Value == null) - throw new ArgumentNullException(nameof(role), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role."); if (roleUuid.IsSet && roleUuid.Value == null) - throw new ArgumentNullException(nameof(roleUuid), "Property is not nullable for class RolesReportsHash."); + throw new JsonException("Property is not nullable for class RolesReportsHash: role_uuid."); return new RolesReportsHash(role, roleUuid); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs index 7ac7e71cbc15..367680a1a300 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/RolesReportsHashRole.cs @@ -145,7 +145,7 @@ public override RolesReportsHashRole Read(ref Utf8JsonReader utf8JsonReader, Typ } if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class RolesReportsHashRole."); + throw new JsonException("Property is not nullable for class RolesReportsHashRole: name."); return new RolesReportsHashRole(name); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index fc2982004601..d8eac4a684ce 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -151,16 +151,16 @@ public override ScaleneTriangle Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(shapeType)); + throw new JsonException("Property is required for class ScaleneTriangle: shapeType."); if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class ScaleneTriangle.", nameof(triangleType)); + throw new JsonException("Property is required for class ScaleneTriangle: triangleType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: shapeType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class ScaleneTriangle."); + throw new JsonException("Property is not nullable for class ScaleneTriangle: triangleType."); return new ScaleneTriangle(shapeType.Value, triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs index 7a2dd62962fb..49b8e42ab4f9 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Shape.cs @@ -193,10 +193,10 @@ public override Shape Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class Shape.", nameof(shapeType)); + throw new JsonException("Property is required for class Shape: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class Shape."); + throw new JsonException("Property is not nullable for class Shape: shapeType."); if (quadrilateral != null) return new Shape(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs index 54079932ecbf..3fce1535c904 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -138,10 +138,10 @@ public override ShapeInterface Read(ref Utf8JsonReader utf8JsonReader, Type type } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeInterface.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeInterface: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeInterface."); + throw new JsonException("Property is not nullable for class ShapeInterface: shapeType."); return new ShapeInterface(shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 52a892aeb9e1..fa998a6ecdd7 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -193,10 +193,10 @@ public override ShapeOrNull Read(ref Utf8JsonReader utf8JsonReader, Type typeToC } if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class ShapeOrNull.", nameof(shapeType)); + throw new JsonException("Property is required for class ShapeOrNull: shapeType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class ShapeOrNull."); + throw new JsonException("Property is not nullable for class ShapeOrNull: shapeType."); if (quadrilateral != null) return new ShapeOrNull(quadrilateral); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index 45ef5585c1a2..179b7c602d12 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -151,16 +151,16 @@ public override SimpleQuadrilateral Read(ref Utf8JsonReader utf8JsonReader, Type } if (!quadrilateralType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(quadrilateralType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: quadrilateralType."); if (!shapeType.IsSet) - throw new ArgumentException("Property is required for class SimpleQuadrilateral.", nameof(shapeType)); + throw new JsonException("Property is required for class SimpleQuadrilateral: shapeType."); if (quadrilateralType.IsSet && quadrilateralType.Value == null) - throw new ArgumentNullException(nameof(quadrilateralType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: quadrilateralType."); if (shapeType.IsSet && shapeType.Value == null) - throw new ArgumentNullException(nameof(shapeType), "Property is not nullable for class SimpleQuadrilateral."); + throw new JsonException("Property is not nullable for class SimpleQuadrilateral: shapeType."); return new SimpleQuadrilateral(quadrilateralType.Value, shapeType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs index b6bcd6886413..51235500e5cc 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -165,10 +165,10 @@ public override SpecialModelName Read(ref Utf8JsonReader utf8JsonReader, Type ty } if (varSpecialModelName.IsSet && varSpecialModelName.Value == null) - throw new ArgumentNullException(nameof(varSpecialModelName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: _special_model.name_."); if (specialPropertyName.IsSet && specialPropertyName.Value == null) - throw new ArgumentNullException(nameof(specialPropertyName), "Property is not nullable for class SpecialModelName."); + throw new JsonException("Property is not nullable for class SpecialModelName: $special[property.name]."); return new SpecialModelName(varSpecialModelName, specialPropertyName); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs index d0d4298cab55..04b4e2a7feb8 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Tag.cs @@ -165,10 +165,10 @@ public override Tag Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: id."); if (name.IsSet && name.Value == null) - throw new ArgumentNullException(nameof(name), "Property is not nullable for class Tag."); + throw new JsonException("Property is not nullable for class Tag: name."); return new Tag(id, name); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs index db057bf9b74f..77efc5ff13d4 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordList.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordList Read(ref Utf8JsonReader utf8Jso } if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TestCollectionEndingWithWordList."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordList: value."); return new TestCollectionEndingWithWordList(value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs index e7b97dd14788..d58df26387cf 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestCollectionEndingWithWordListObject.cs @@ -145,7 +145,7 @@ public override TestCollectionEndingWithWordListObject Read(ref Utf8JsonReader u } if (testCollectionEndingWithWordList.IsSet && testCollectionEndingWithWordList.Value == null) - throw new ArgumentNullException(nameof(testCollectionEndingWithWordList), "Property is not nullable for class TestCollectionEndingWithWordListObject."); + throw new JsonException("Property is not nullable for class TestCollectionEndingWithWordListObject: TestCollectionEndingWithWordList."); return new TestCollectionEndingWithWordListObject(testCollectionEndingWithWordList); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs index a28ece650979..39a686cd928e 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestDescendants.cs @@ -241,16 +241,16 @@ public override TestDescendants Read(ref Utf8JsonReader utf8JsonReader, Type typ } if (!alternativeName.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(alternativeName)); + throw new JsonException("Property is required for class TestDescendants: alternativeName."); if (!objectType.IsSet) - throw new ArgumentException("Property is required for class TestDescendants.", nameof(objectType)); + throw new JsonException("Property is required for class TestDescendants: objectType."); if (alternativeName.IsSet && alternativeName.Value == null) - throw new ArgumentNullException(nameof(alternativeName), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: alternativeName."); if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class TestDescendants."); + throw new JsonException("Property is not nullable for class TestDescendants: objectType."); return new TestDescendants(alternativeName.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs index b2ef6e096109..1e931bd94731 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs @@ -145,7 +145,7 @@ public override TestInlineFreeformAdditionalPropertiesRequest Read(ref Utf8JsonR } if (someProperty.IsSet && someProperty.Value == null) - throw new ArgumentNullException(nameof(someProperty), "Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest."); + throw new JsonException("Property is not nullable for class TestInlineFreeformAdditionalPropertiesRequest: someProperty."); return new TestInlineFreeformAdditionalPropertiesRequest(someProperty); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestResult.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestResult.cs index e367448c907f..5da58612b7ef 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestResult.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TestResult.cs @@ -187,13 +187,13 @@ public override TestResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo } if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: code."); if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: data."); if (uuid.IsSet && uuid.Value == null) - throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class TestResult."); + throw new JsonException("Property is not nullable for class TestResult: uuid."); return new TestResult(code, data, uuid); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs index 9e1ae42200c6..1ef3b35e8e9c 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Triangle.cs @@ -214,10 +214,10 @@ public override Triangle Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class Triangle.", nameof(triangleType)); + throw new JsonException("Property is required for class Triangle: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class Triangle."); + throw new JsonException("Property is not nullable for class Triangle: triangleType."); if (equilateralTriangle != null) return new Triangle(equilateralTriangle); diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs index afe9457b01a5..ed4592635d34 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -138,10 +138,10 @@ public override TriangleInterface Read(ref Utf8JsonReader utf8JsonReader, Type t } if (!triangleType.IsSet) - throw new ArgumentException("Property is required for class TriangleInterface.", nameof(triangleType)); + throw new JsonException("Property is required for class TriangleInterface: triangleType."); if (triangleType.IsSet && triangleType.Value == null) - throw new ArgumentNullException(nameof(triangleType), "Property is not nullable for class TriangleInterface."); + throw new JsonException("Property is not nullable for class TriangleInterface: triangleType."); return new TriangleInterface(triangleType.Value); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs index dd4db4f456f1..6371c3897a76 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/User.cs @@ -370,31 +370,31 @@ public override User Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, } if (email.IsSet && email.Value == null) - throw new ArgumentNullException(nameof(email), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: email."); if (firstName.IsSet && firstName.Value == null) - throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: firstName."); if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: id."); if (lastName.IsSet && lastName.Value == null) - throw new ArgumentNullException(nameof(lastName), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: lastName."); if (objectWithNoDeclaredProps.IsSet && objectWithNoDeclaredProps.Value == null) - throw new ArgumentNullException(nameof(objectWithNoDeclaredProps), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: objectWithNoDeclaredProps."); if (password.IsSet && password.Value == null) - throw new ArgumentNullException(nameof(password), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: password."); if (phone.IsSet && phone.Value == null) - throw new ArgumentNullException(nameof(phone), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: phone."); if (userStatus.IsSet && userStatus.Value == null) - throw new ArgumentNullException(nameof(userStatus), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: userStatus."); if (username.IsSet && username.Value == null) - throw new ArgumentNullException(nameof(username), "Property is not nullable for class User."); + throw new JsonException("Property is not nullable for class User: username."); return new User(anyTypeProp, anyTypePropNullable, email, firstName, id, lastName, objectWithNoDeclaredProps, objectWithNoDeclaredPropsNullable, password, phone, userStatus, username); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs index c1abfbfd12c0..a862447465b1 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Whale.cs @@ -178,16 +178,16 @@ public override Whale Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Whale.", nameof(className)); + throw new JsonException("Property is required for class Whale: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: className."); if (hasBaleen.IsSet && hasBaleen.Value == null) - throw new ArgumentNullException(nameof(hasBaleen), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasBaleen."); if (hasTeeth.IsSet && hasTeeth.Value == null) - throw new ArgumentNullException(nameof(hasTeeth), "Property is not nullable for class Whale."); + throw new JsonException("Property is not nullable for class Whale: hasTeeth."); return new Whale(className.Value, hasBaleen, hasTeeth); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs index c6144e93c73d..4d6c01689db7 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/Zebra.cs @@ -245,13 +245,13 @@ public override Zebra Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert } if (!className.IsSet) - throw new ArgumentException("Property is required for class Zebra.", nameof(className)); + throw new JsonException("Property is required for class Zebra: className."); if (className.IsSet && className.Value == null) - throw new ArgumentNullException(nameof(className), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: className."); if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class Zebra."); + throw new JsonException("Property is not nullable for class Zebra: type."); return new Zebra(className.Value, type); } diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs index 4ce3561c85ec..44b24d2dad67 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/src/Org.OpenAPITools/Model/ZeroBasedEnumClass.cs @@ -218,7 +218,7 @@ public override ZeroBasedEnumClass Read(ref Utf8JsonReader utf8JsonReader, Type } if (zeroBasedEnum.IsSet && zeroBasedEnum.Value == null) - throw new ArgumentNullException(nameof(zeroBasedEnum), "Property is not nullable for class ZeroBasedEnumClass."); + throw new JsonException("Property is not nullable for class ZeroBasedEnumClass: ZeroBasedEnum."); return new ZeroBasedEnumClass(zeroBasedEnum); } diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/PetApi.java index 63e809902cd2..24d8eed8a123 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/PetApi.java @@ -48,7 +48,7 @@ public PetApi(ApiClient apiClient) { * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet addPet(Pet pet) throws RestClientException { + public Pet addPet(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { return addPetWithHttpInfo(pet).getBody(); } @@ -61,7 +61,7 @@ public Pet addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -97,7 +97,7 @@ public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientExceptio * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deletePet(Long petId, String apiKey) throws RestClientException { + public void deletePet(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientException { deletePetWithHttpInfo(petId, apiKey); } @@ -110,7 +110,7 @@ public void deletePet(Long petId, String apiKey) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { + public ResponseEntity deletePetWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String apiKey) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -149,7 +149,7 @@ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) thr * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public List findPetsByStatus(List status) throws RestClientException { + public List findPetsByStatus(@jakarta.annotation.Nonnull List status) throws RestClientException { return findPetsByStatusWithHttpInfo(status).getBody(); } @@ -162,7 +162,7 @@ public List findPetsByStatus(List status) throws RestClientExceptio * @return ResponseEntity<List<Pet>> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { + public ResponseEntity> findPetsByStatusWithHttpInfo(@jakarta.annotation.Nonnull List status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -202,7 +202,7 @@ public ResponseEntity> findPetsByStatusWithHttpInfo(List statu * @deprecated */ @Deprecated - public List findPetsByTags(List tags) throws RestClientException { + public List findPetsByTags(@jakarta.annotation.Nonnull List tags) throws RestClientException { return findPetsByTagsWithHttpInfo(tags).getBody(); } @@ -217,7 +217,7 @@ public List findPetsByTags(List tags) throws RestClientException { * @deprecated */ @Deprecated - public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException { + public ResponseEntity> findPetsByTagsWithHttpInfo(@jakarta.annotation.Nonnull List tags) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -256,7 +256,7 @@ public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) t * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet getPetById(Long petId) throws RestClientException { + public Pet getPetById(@jakarta.annotation.Nonnull Long petId) throws RestClientException { return getPetByIdWithHttpInfo(petId).getBody(); } @@ -270,7 +270,7 @@ public Pet getPetById(Long petId) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { + public ResponseEntity getPetByIdWithHttpInfo(@jakarta.annotation.Nonnull Long petId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -312,7 +312,7 @@ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientE * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public Pet updatePet(Pet pet) throws RestClientException { + public Pet updatePet(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { return updatePetWithHttpInfo(pet).getBody(); } @@ -329,7 +329,7 @@ public Pet updatePet(Pet pet) throws RestClientException { * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity updatePetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -366,7 +366,7 @@ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientExcep * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + public void updatePetWithForm(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientException { updatePetWithFormWithHttpInfo(petId, name, status); } @@ -380,7 +380,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Res * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { + public ResponseEntity updatePetWithFormWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String name, @jakarta.annotation.Nullable String status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -424,7 +424,7 @@ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String nam * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ModelApiResponse uploadFile(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientException { return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getBody(); } @@ -438,7 +438,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ResponseEntity uploadFileWithHttpInfo(@jakarta.annotation.Nonnull Long petId, @jakarta.annotation.Nullable String additionalMetadata, @jakarta.annotation.Nullable File _file) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java index cd5751851c7b..4ba0712cadc4 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/StoreApi.java @@ -45,7 +45,7 @@ public StoreApi(ApiClient apiClient) { * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteOrder(String orderId) throws RestClientException { + public void deleteOrder(@jakarta.annotation.Nonnull String orderId) throws RestClientException { deleteOrderWithHttpInfo(orderId); } @@ -58,7 +58,7 @@ public void deleteOrder(String orderId) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { + public ResponseEntity deleteOrderWithHttpInfo(@jakarta.annotation.Nonnull String orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -134,7 +134,7 @@ public ResponseEntity> getInventoryWithHttpInfo() throws Re * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order getOrderById(Long orderId) throws RestClientException { + public Order getOrderById(@jakarta.annotation.Nonnull Long orderId) throws RestClientException { return getOrderByIdWithHttpInfo(orderId).getBody(); } @@ -148,7 +148,7 @@ public Order getOrderById(Long orderId) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { + public ResponseEntity getOrderByIdWithHttpInfo(@jakarta.annotation.Nonnull Long orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -186,7 +186,7 @@ public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestC * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order order) throws RestClientException { + public Order placeOrder(@jakarta.annotation.Nonnull Order order) throws RestClientException { return placeOrderWithHttpInfo(order).getBody(); } @@ -199,7 +199,7 @@ public Order placeOrder(Order order) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + public ResponseEntity placeOrderWithHttpInfo(@jakarta.annotation.Nonnull Order order) throws RestClientException { Object localVarPostBody = order; // verify the required parameter 'order' is set diff --git a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/UserApi.java index f0155fbb02e1..4d07c2bc8304 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-jakarta/src/main/java/org/openapitools/client/api/UserApi.java @@ -45,7 +45,7 @@ public UserApi(ApiClient apiClient) { * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User user) throws RestClientException { + public void createUser(@jakarta.annotation.Nonnull User user) throws RestClientException { createUserWithHttpInfo(user); } @@ -57,7 +57,7 @@ public void createUser(User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + public ResponseEntity createUserWithHttpInfo(@jakarta.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -90,7 +90,7 @@ public ResponseEntity createUserWithHttpInfo(User user) throws RestClientE * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List user) throws RestClientException { + public void createUsersWithArrayInput(@jakarta.annotation.Nonnull List user) throws RestClientException { createUsersWithArrayInputWithHttpInfo(user); } @@ -102,7 +102,7 @@ public void createUsersWithArrayInput(List user) throws RestClientExceptio * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@jakarta.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -135,7 +135,7 @@ public ResponseEntity createUsersWithArrayInputWithHttpInfo(List use * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List user) throws RestClientException { + public void createUsersWithListInput(@jakarta.annotation.Nonnull List user) throws RestClientException { createUsersWithListInputWithHttpInfo(user); } @@ -147,7 +147,7 @@ public void createUsersWithListInput(List user) throws RestClientException * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithListInputWithHttpInfo(@jakarta.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -181,7 +181,7 @@ public ResponseEntity createUsersWithListInputWithHttpInfo(List user * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteUser(String username) throws RestClientException { + public void deleteUser(@jakarta.annotation.Nonnull String username) throws RestClientException { deleteUserWithHttpInfo(username); } @@ -194,7 +194,7 @@ public void deleteUser(String username) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { + public ResponseEntity deleteUserWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -231,7 +231,7 @@ public ResponseEntity deleteUserWithHttpInfo(String username) throws RestC * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User getUserByName(String username) throws RestClientException { + public User getUserByName(@jakarta.annotation.Nonnull String username) throws RestClientException { return getUserByNameWithHttpInfo(username).getBody(); } @@ -245,7 +245,7 @@ public User getUserByName(String username) throws RestClientException { * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { + public ResponseEntity getUserByNameWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -284,7 +284,7 @@ public ResponseEntity getUserByNameWithHttpInfo(String username) throws Re * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String loginUser(String username, String password) throws RestClientException { + public String loginUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientException { return loginUserWithHttpInfo(username, password).getBody(); } @@ -298,7 +298,7 @@ public String loginUser(String username, String password) throws RestClientExcep * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { + public ResponseEntity loginUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -378,7 +378,7 @@ public ResponseEntity logoutUserWithHttpInfo() throws RestClientException * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User user) throws RestClientException { + public void updateUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientException { updateUserWithHttpInfo(username, user); } @@ -392,7 +392,7 @@ public void updateUser(String username, User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + public ResponseEntity updateUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'username' is set diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/src/main/java/org/openapitools/client/api/PetApi.java index 04dbbcf4b4d0..eaeb4cd22de3 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson2/src/main/java/org/openapitools/client/api/PetApi.java @@ -46,7 +46,7 @@ public PetApi(ApiClient apiClient) { * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet addPet(Pet pet) throws RestClientException { + public Pet addPet(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { return addPetWithHttpInfo(pet).getBody(); } @@ -59,7 +59,7 @@ public Pet addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FooApi.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FooApi.java index 392e33f924a7..142a49b97ecf 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FooApi.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/FooApi.java @@ -50,7 +50,7 @@ public FooApi(ApiClient apiClient) { * @return Foo * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Foo fooDtParamGet(java.time.Instant dtParam, java.time.Instant dtQuery, java.time.Instant dtCookie, String color) throws RestClientException { + public Foo fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color) throws RestClientException { return fooDtParamGetWithHttpInfo(dtParam, dtQuery, dtCookie, color).getBody(); } @@ -65,7 +65,7 @@ public Foo fooDtParamGet(java.time.Instant dtParam, java.time.Instant dtQuery, j * @return ResponseEntity<Foo> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fooDtParamGetWithHttpInfo(java.time.Instant dtParam, java.time.Instant dtQuery, java.time.Instant dtCookie, String color) throws RestClientException { + public ResponseEntity fooDtParamGetWithHttpInfo(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color) throws RestClientException { Object localVarPostBody = null; // create path and map variables diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/UploadApi.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/UploadApi.java index 0a144089ca6d..0d89ec72f762 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/UploadApi.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify/src/main/java/org/openapitools/client/api/UploadApi.java @@ -45,7 +45,7 @@ public UploadApi(ApiClient apiClient) { * @param _file (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void uploadFilesPost(List _file) throws RestClientException { + public void uploadFilesPost(@Nullable List _file) throws RestClientException { uploadFilesPostWithHttpInfo(_file); } @@ -57,7 +57,7 @@ public void uploadFilesPost(List _file) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFilesPostWithHttpInfo(List _file) throws RestClientException { + public ResponseEntity uploadFilesPostWithHttpInfo(@Nullable List _file) throws RestClientException { Object localVarPostBody = null; @@ -88,7 +88,7 @@ public ResponseEntity uploadFilesPostWithHttpInfo(List _file) throws * @param _file (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void uploadPost(File _file) throws RestClientException { + public void uploadPost(@Nullable File _file) throws RestClientException { uploadPostWithHttpInfo(_file); } @@ -100,7 +100,7 @@ public void uploadPost(File _file) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadPostWithHttpInfo(File _file) throws RestClientException { + public ResponseEntity uploadPostWithHttpInfo(@Nullable File _file) throws RestClientException { Object localVarPostBody = null; diff --git a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/src/main/java/org/openapitools/client/api/PetApi.java index 04dbbcf4b4d0..eaeb4cd22de3 100644 --- a/samples/client/petstore/java/resttemplate-springBoot4-jackson3/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-springBoot4-jackson3/src/main/java/org/openapitools/client/api/PetApi.java @@ -46,7 +46,7 @@ public PetApi(ApiClient apiClient) { * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet addPet(Pet pet) throws RestClientException { + public Pet addPet(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { return addPetWithHttpInfo(pet).getBody(); } @@ -59,7 +59,7 @@ public Pet addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@jakarta.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java index 6dcb9db90546..e9caeb6abdd2 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java @@ -48,7 +48,7 @@ public PetApi(ApiClient apiClient) { * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet addPet(Pet pet) throws RestClientException { + public Pet addPet(@javax.annotation.Nonnull Pet pet) throws RestClientException { return addPetWithHttpInfo(pet).getBody(); } @@ -61,7 +61,7 @@ public Pet addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -97,7 +97,7 @@ public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientExceptio * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deletePet(Long petId, String apiKey) throws RestClientException { + public void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { deletePetWithHttpInfo(petId, apiKey); } @@ -110,7 +110,7 @@ public void deletePet(Long petId, String apiKey) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { + public ResponseEntity deletePetWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -149,7 +149,7 @@ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) thr * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public List findPetsByStatus(List status) throws RestClientException { + public List findPetsByStatus(@javax.annotation.Nonnull List status) throws RestClientException { return findPetsByStatusWithHttpInfo(status).getBody(); } @@ -162,7 +162,7 @@ public List findPetsByStatus(List status) throws RestClientExceptio * @return ResponseEntity<List<Pet>> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { + public ResponseEntity> findPetsByStatusWithHttpInfo(@javax.annotation.Nonnull List status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -202,7 +202,7 @@ public ResponseEntity> findPetsByStatusWithHttpInfo(List statu * @deprecated */ @Deprecated - public List findPetsByTags(List tags) throws RestClientException { + public List findPetsByTags(@javax.annotation.Nonnull List tags) throws RestClientException { return findPetsByTagsWithHttpInfo(tags).getBody(); } @@ -217,7 +217,7 @@ public List findPetsByTags(List tags) throws RestClientException { * @deprecated */ @Deprecated - public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException { + public ResponseEntity> findPetsByTagsWithHttpInfo(@javax.annotation.Nonnull List tags) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -256,7 +256,7 @@ public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) t * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet getPetById(Long petId) throws RestClientException { + public Pet getPetById(@javax.annotation.Nonnull Long petId) throws RestClientException { return getPetByIdWithHttpInfo(petId).getBody(); } @@ -270,7 +270,7 @@ public Pet getPetById(Long petId) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { + public ResponseEntity getPetByIdWithHttpInfo(@javax.annotation.Nonnull Long petId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -312,7 +312,7 @@ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientE * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public Pet updatePet(Pet pet) throws RestClientException { + public Pet updatePet(@javax.annotation.Nonnull Pet pet) throws RestClientException { return updatePetWithHttpInfo(pet).getBody(); } @@ -329,7 +329,7 @@ public Pet updatePet(Pet pet) throws RestClientException { * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity updatePetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -366,7 +366,7 @@ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientExcep * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + public void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { updatePetWithFormWithHttpInfo(petId, name, status); } @@ -380,7 +380,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Res * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { + public ResponseEntity updatePetWithFormWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -424,7 +424,7 @@ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String nam * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ModelApiResponse uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getBody(); } @@ -438,7 +438,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ResponseEntity uploadFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java index d13023e3c398..187c2e860969 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -45,7 +45,7 @@ public StoreApi(ApiClient apiClient) { * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteOrder(String orderId) throws RestClientException { + public void deleteOrder(@javax.annotation.Nonnull String orderId) throws RestClientException { deleteOrderWithHttpInfo(orderId); } @@ -58,7 +58,7 @@ public void deleteOrder(String orderId) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { + public ResponseEntity deleteOrderWithHttpInfo(@javax.annotation.Nonnull String orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -134,7 +134,7 @@ public ResponseEntity> getInventoryWithHttpInfo() throws Re * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order getOrderById(Long orderId) throws RestClientException { + public Order getOrderById(@javax.annotation.Nonnull Long orderId) throws RestClientException { return getOrderByIdWithHttpInfo(orderId).getBody(); } @@ -148,7 +148,7 @@ public Order getOrderById(Long orderId) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { + public ResponseEntity getOrderByIdWithHttpInfo(@javax.annotation.Nonnull Long orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -186,7 +186,7 @@ public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestC * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order order) throws RestClientException { + public Order placeOrder(@javax.annotation.Nonnull Order order) throws RestClientException { return placeOrderWithHttpInfo(order).getBody(); } @@ -199,7 +199,7 @@ public Order placeOrder(Order order) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + public ResponseEntity placeOrderWithHttpInfo(@javax.annotation.Nonnull Order order) throws RestClientException { Object localVarPostBody = order; // verify the required parameter 'order' is set diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/UserApi.java index 57d94f044cd8..4b76b7286db9 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/UserApi.java @@ -45,7 +45,7 @@ public UserApi(ApiClient apiClient) { * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User user) throws RestClientException { + public void createUser(@javax.annotation.Nonnull User user) throws RestClientException { createUserWithHttpInfo(user); } @@ -57,7 +57,7 @@ public void createUser(User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + public ResponseEntity createUserWithHttpInfo(@javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -90,7 +90,7 @@ public ResponseEntity createUserWithHttpInfo(User user) throws RestClientE * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List user) throws RestClientException { + public void createUsersWithArrayInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithArrayInputWithHttpInfo(user); } @@ -102,7 +102,7 @@ public void createUsersWithArrayInput(List user) throws RestClientExceptio * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -135,7 +135,7 @@ public ResponseEntity createUsersWithArrayInputWithHttpInfo(List use * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List user) throws RestClientException { + public void createUsersWithListInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithListInputWithHttpInfo(user); } @@ -147,7 +147,7 @@ public void createUsersWithListInput(List user) throws RestClientException * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithListInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -181,7 +181,7 @@ public ResponseEntity createUsersWithListInputWithHttpInfo(List user * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteUser(String username) throws RestClientException { + public void deleteUser(@javax.annotation.Nonnull String username) throws RestClientException { deleteUserWithHttpInfo(username); } @@ -194,7 +194,7 @@ public void deleteUser(String username) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { + public ResponseEntity deleteUserWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -231,7 +231,7 @@ public ResponseEntity deleteUserWithHttpInfo(String username) throws RestC * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User getUserByName(String username) throws RestClientException { + public User getUserByName(@javax.annotation.Nonnull String username) throws RestClientException { return getUserByNameWithHttpInfo(username).getBody(); } @@ -245,7 +245,7 @@ public User getUserByName(String username) throws RestClientException { * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { + public ResponseEntity getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -284,7 +284,7 @@ public ResponseEntity getUserByNameWithHttpInfo(String username) throws Re * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String loginUser(String username, String password) throws RestClientException { + public String loginUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { return loginUserWithHttpInfo(username, password).getBody(); } @@ -298,7 +298,7 @@ public String loginUser(String username, String password) throws RestClientExcep * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { + public ResponseEntity loginUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -378,7 +378,7 @@ public ResponseEntity logoutUserWithHttpInfo() throws RestClientException * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User user) throws RestClientException { + public void updateUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { updateUserWithHttpInfo(username, user); } @@ -392,7 +392,7 @@ public void updateUser(String username, User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + public ResponseEntity updateUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'username' is set diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/PetApi.java index 6dcb9db90546..e9caeb6abdd2 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/PetApi.java @@ -48,7 +48,7 @@ public PetApi(ApiClient apiClient) { * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet addPet(Pet pet) throws RestClientException { + public Pet addPet(@javax.annotation.Nonnull Pet pet) throws RestClientException { return addPetWithHttpInfo(pet).getBody(); } @@ -61,7 +61,7 @@ public Pet addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -97,7 +97,7 @@ public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientExceptio * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deletePet(Long petId, String apiKey) throws RestClientException { + public void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { deletePetWithHttpInfo(petId, apiKey); } @@ -110,7 +110,7 @@ public void deletePet(Long petId, String apiKey) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { + public ResponseEntity deletePetWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -149,7 +149,7 @@ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) thr * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public List findPetsByStatus(List status) throws RestClientException { + public List findPetsByStatus(@javax.annotation.Nonnull List status) throws RestClientException { return findPetsByStatusWithHttpInfo(status).getBody(); } @@ -162,7 +162,7 @@ public List findPetsByStatus(List status) throws RestClientExceptio * @return ResponseEntity<List<Pet>> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { + public ResponseEntity> findPetsByStatusWithHttpInfo(@javax.annotation.Nonnull List status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -202,7 +202,7 @@ public ResponseEntity> findPetsByStatusWithHttpInfo(List statu * @deprecated */ @Deprecated - public List findPetsByTags(List tags) throws RestClientException { + public List findPetsByTags(@javax.annotation.Nonnull List tags) throws RestClientException { return findPetsByTagsWithHttpInfo(tags).getBody(); } @@ -217,7 +217,7 @@ public List findPetsByTags(List tags) throws RestClientException { * @deprecated */ @Deprecated - public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) throws RestClientException { + public ResponseEntity> findPetsByTagsWithHttpInfo(@javax.annotation.Nonnull List tags) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -256,7 +256,7 @@ public ResponseEntity> findPetsByTagsWithHttpInfo(List tags) t * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet getPetById(Long petId) throws RestClientException { + public Pet getPetById(@javax.annotation.Nonnull Long petId) throws RestClientException { return getPetByIdWithHttpInfo(petId).getBody(); } @@ -270,7 +270,7 @@ public Pet getPetById(Long petId) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { + public ResponseEntity getPetByIdWithHttpInfo(@javax.annotation.Nonnull Long petId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -312,7 +312,7 @@ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientE * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public Pet updatePet(Pet pet) throws RestClientException { + public Pet updatePet(@javax.annotation.Nonnull Pet pet) throws RestClientException { return updatePetWithHttpInfo(pet).getBody(); } @@ -329,7 +329,7 @@ public Pet updatePet(Pet pet) throws RestClientException { * API documentation for the updatePet operation * @see Update an existing pet Documentation */ - public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity updatePetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -366,7 +366,7 @@ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientExcep * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + public void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { updatePetWithFormWithHttpInfo(petId, name, status); } @@ -380,7 +380,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Res * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { + public ResponseEntity updatePetWithFormWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -424,7 +424,7 @@ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String nam * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ModelApiResponse uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getBody(); } @@ -438,7 +438,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ResponseEntity uploadFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/StoreApi.java index d13023e3c398..187c2e860969 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -45,7 +45,7 @@ public StoreApi(ApiClient apiClient) { * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteOrder(String orderId) throws RestClientException { + public void deleteOrder(@javax.annotation.Nonnull String orderId) throws RestClientException { deleteOrderWithHttpInfo(orderId); } @@ -58,7 +58,7 @@ public void deleteOrder(String orderId) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { + public ResponseEntity deleteOrderWithHttpInfo(@javax.annotation.Nonnull String orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -134,7 +134,7 @@ public ResponseEntity> getInventoryWithHttpInfo() throws Re * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order getOrderById(Long orderId) throws RestClientException { + public Order getOrderById(@javax.annotation.Nonnull Long orderId) throws RestClientException { return getOrderByIdWithHttpInfo(orderId).getBody(); } @@ -148,7 +148,7 @@ public Order getOrderById(Long orderId) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { + public ResponseEntity getOrderByIdWithHttpInfo(@javax.annotation.Nonnull Long orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -186,7 +186,7 @@ public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestC * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order order) throws RestClientException { + public Order placeOrder(@javax.annotation.Nonnull Order order) throws RestClientException { return placeOrderWithHttpInfo(order).getBody(); } @@ -199,7 +199,7 @@ public Order placeOrder(Order order) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + public ResponseEntity placeOrderWithHttpInfo(@javax.annotation.Nonnull Order order) throws RestClientException { Object localVarPostBody = order; // verify the required parameter 'order' is set diff --git a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/UserApi.java index 57d94f044cd8..4b76b7286db9 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-swagger2/src/main/java/org/openapitools/client/api/UserApi.java @@ -45,7 +45,7 @@ public UserApi(ApiClient apiClient) { * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User user) throws RestClientException { + public void createUser(@javax.annotation.Nonnull User user) throws RestClientException { createUserWithHttpInfo(user); } @@ -57,7 +57,7 @@ public void createUser(User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + public ResponseEntity createUserWithHttpInfo(@javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -90,7 +90,7 @@ public ResponseEntity createUserWithHttpInfo(User user) throws RestClientE * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List user) throws RestClientException { + public void createUsersWithArrayInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithArrayInputWithHttpInfo(user); } @@ -102,7 +102,7 @@ public void createUsersWithArrayInput(List user) throws RestClientExceptio * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -135,7 +135,7 @@ public ResponseEntity createUsersWithArrayInputWithHttpInfo(List use * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List user) throws RestClientException { + public void createUsersWithListInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithListInputWithHttpInfo(user); } @@ -147,7 +147,7 @@ public void createUsersWithListInput(List user) throws RestClientException * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithListInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -181,7 +181,7 @@ public ResponseEntity createUsersWithListInputWithHttpInfo(List user * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteUser(String username) throws RestClientException { + public void deleteUser(@javax.annotation.Nonnull String username) throws RestClientException { deleteUserWithHttpInfo(username); } @@ -194,7 +194,7 @@ public void deleteUser(String username) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { + public ResponseEntity deleteUserWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -231,7 +231,7 @@ public ResponseEntity deleteUserWithHttpInfo(String username) throws RestC * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User getUserByName(String username) throws RestClientException { + public User getUserByName(@javax.annotation.Nonnull String username) throws RestClientException { return getUserByNameWithHttpInfo(username).getBody(); } @@ -245,7 +245,7 @@ public User getUserByName(String username) throws RestClientException { * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { + public ResponseEntity getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -284,7 +284,7 @@ public ResponseEntity getUserByNameWithHttpInfo(String username) throws Re * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String loginUser(String username, String password) throws RestClientException { + public String loginUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { return loginUserWithHttpInfo(username, password).getBody(); } @@ -298,7 +298,7 @@ public String loginUser(String username, String password) throws RestClientExcep * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { + public ResponseEntity loginUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -378,7 +378,7 @@ public ResponseEntity logoutUserWithHttpInfo() throws RestClientException * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User user) throws RestClientException { + public void updateUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { updateUserWithHttpInfo(username, user); } @@ -392,7 +392,7 @@ public void updateUser(String username, User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + public ResponseEntity updateUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'username' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 0307e5febcbf..d4a87120a76b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public AnotherFakeApi(ApiClient apiClient) { * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(Client client) throws RestClientException { + public Client call123testSpecialTags(@javax.annotation.Nonnull Client client) throws RestClientException { return call123testSpecialTagsWithHttpInfo(client).getBody(); } @@ -57,7 +57,7 @@ public Client call123testSpecialTags(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity call123testSpecialTagsWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 729ffb7db428..3366149610e2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -138,7 +138,7 @@ public ResponseEntity fakeHealthGetWithHttpInfo() throws Rest * @param header1 header parameter (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws RestClientException { + public void fakeHttpSignatureTest(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1) throws RestClientException { fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); } @@ -152,7 +152,7 @@ public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws RestClientException { + public ResponseEntity fakeHttpSignatureTestWithHttpInfo(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -192,7 +192,7 @@ public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String qu * @return Boolean * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientException { + public Boolean fakeOuterBooleanSerialize(@javax.annotation.Nullable Boolean body) throws RestClientException { return fakeOuterBooleanSerializeWithHttpInfo(body).getBody(); } @@ -204,7 +204,7 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientExceptio * @return ResponseEntity<Boolean> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws RestClientException { + public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(@javax.annotation.Nullable Boolean body) throws RestClientException { Object localVarPostBody = body; @@ -235,7 +235,7 @@ public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean bod * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws RestClientException { + public OuterComposite fakeOuterCompositeSerialize(@javax.annotation.Nullable OuterComposite outerComposite) throws RestClientException { return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getBody(); } @@ -247,7 +247,7 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) * @return ResponseEntity<OuterComposite> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws RestClientException { + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(@javax.annotation.Nullable OuterComposite outerComposite) throws RestClientException { Object localVarPostBody = outerComposite; @@ -278,7 +278,7 @@ public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(Ou * @return BigDecimal * @throws RestClientException if an error occurs while attempting to invoke the API */ - public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientException { + public BigDecimal fakeOuterNumberSerialize(@javax.annotation.Nullable BigDecimal body) throws RestClientException { return fakeOuterNumberSerializeWithHttpInfo(body).getBody(); } @@ -290,7 +290,7 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientExc * @return ResponseEntity<BigDecimal> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws RestClientException { + public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(@javax.annotation.Nullable BigDecimal body) throws RestClientException { Object localVarPostBody = body; @@ -321,7 +321,7 @@ public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecima * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String fakeOuterStringSerialize(String body) throws RestClientException { + public String fakeOuterStringSerialize(@javax.annotation.Nullable String body) throws RestClientException { return fakeOuterStringSerializeWithHttpInfo(body).getBody(); } @@ -333,7 +333,7 @@ public String fakeOuterStringSerialize(String body) throws RestClientException { * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) throws RestClientException { + public ResponseEntity fakeOuterStringSerializeWithHttpInfo(@javax.annotation.Nullable String body) throws RestClientException { Object localVarPostBody = body; @@ -364,7 +364,7 @@ public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) * @return OuterObjectWithEnumProperty * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(@javax.annotation.Nonnull OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { return fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty).getBody(); } @@ -376,7 +376,7 @@ public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectW * @return ResponseEntity<OuterObjectWithEnumProperty> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(@javax.annotation.Nonnull OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { Object localVarPostBody = outerObjectWithEnumProperty; // verify the required parameter 'outerObjectWithEnumProperty' is set @@ -411,7 +411,7 @@ public ResponseEntity fakePropertyEnumIntegerSerial * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testAdditionalPropertiesReference(Map requestBody) throws RestClientException { + public void testAdditionalPropertiesReference(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testAdditionalPropertiesReferenceWithHttpInfo(requestBody); } @@ -423,7 +423,7 @@ public void testAdditionalPropertiesReference(Map requestBody) t * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set @@ -456,7 +456,7 @@ public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(Map testBodyWithBinaryWithHttpInfo(File body) throws RestClientException { + public ResponseEntity testBodyWithBinaryWithHttpInfo(@javax.annotation.Nullable File body) throws RestClientException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -501,7 +501,7 @@ public ResponseEntity testBodyWithBinaryWithHttpInfo(File body) throws Res * @param fileSchemaTestClass (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + public void testBodyWithFileSchema(@javax.annotation.Nonnull FileSchemaTestClass fileSchemaTestClass) throws RestClientException { testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -513,7 +513,7 @@ public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) thro * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(@javax.annotation.Nonnull FileSchemaTestClass fileSchemaTestClass) throws RestClientException { Object localVarPostBody = fileSchemaTestClass; // verify the required parameter 'fileSchemaTestClass' is set @@ -547,7 +547,7 @@ public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestCla * @param user (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithQueryParams(String query, User user) throws RestClientException { + public void testBodyWithQueryParams(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User user) throws RestClientException { testBodyWithQueryParamsWithHttpInfo(query, user); } @@ -560,7 +560,7 @@ public void testBodyWithQueryParams(String query, User user) throws RestClientEx * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User user) throws RestClientException { + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'query' is set @@ -602,7 +602,7 @@ public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, Us * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClientModel(Client client) throws RestClientException { + public Client testClientModel(@javax.annotation.Nonnull Client client) throws RestClientException { return testClientModelWithHttpInfo(client).getBody(); } @@ -614,7 +614,7 @@ public Client testClientModel(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClientModelWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity testClientModelWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set @@ -663,7 +663,7 @@ public ResponseEntity testClientModelWithHttpInfo(Client client) throws * @param paramCallback None (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + public void testEndpointParameters(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable OffsetDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws RestClientException { testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -689,7 +689,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + public ResponseEntity testEndpointParametersWithHttpInfo(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable OffsetDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'number' is set @@ -775,7 +775,7 @@ public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + public void testEnumParameters(@javax.annotation.Nullable List enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List enumQueryModelArray, @javax.annotation.Nullable List enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws RestClientException { testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } @@ -796,7 +796,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + public ResponseEntity testEnumParametersWithHttpInfo(@javax.annotation.Nullable List enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List enumQueryModelArray, @javax.annotation.Nullable List enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws RestClientException { Object localVarPostBody = null; @@ -846,7 +846,7 @@ public ResponseEntity testEnumParametersWithHttpInfo(List enumHead * @param int64Group Integer in group parameters (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + public void testGroupParameters(@javax.annotation.Nonnull Integer requiredStringGroup, @javax.annotation.Nonnull Boolean requiredBooleanGroup, @javax.annotation.Nonnull Long requiredInt64Group, @javax.annotation.Nullable Integer stringGroup, @javax.annotation.Nullable Boolean booleanGroup, @javax.annotation.Nullable Long int64Group) throws RestClientException { testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -863,7 +863,7 @@ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBoo * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + public ResponseEntity testGroupParametersWithHttpInfo(@javax.annotation.Nonnull Integer requiredStringGroup, @javax.annotation.Nonnull Boolean requiredBooleanGroup, @javax.annotation.Nonnull Long requiredInt64Group, @javax.annotation.Nullable Integer stringGroup, @javax.annotation.Nullable Boolean booleanGroup, @javax.annotation.Nullable Long int64Group) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -915,7 +915,7 @@ public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStri * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testInlineAdditionalProperties(Map requestBody) throws RestClientException { + public void testInlineAdditionalProperties(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -927,7 +927,7 @@ public void testInlineAdditionalProperties(Map requestBody) thro * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set @@ -960,7 +960,7 @@ public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws RestClientException { + public ResponseEntity testInlineFreeformAdditionalPropertiesWithHttpInfo(@javax.annotation.Nonnull TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws RestClientException { Object localVarPostBody = testInlineFreeformAdditionalPropertiesRequest; // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set @@ -1006,7 +1006,7 @@ public ResponseEntity testInlineFreeformAdditionalPropertiesWithHttpInfo(T * @param param2 field2 (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testJsonFormData(String param, String param2) throws RestClientException { + public void testJsonFormData(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws RestClientException { testJsonFormDataWithHttpInfo(param, param2); } @@ -1019,7 +1019,7 @@ public void testJsonFormData(String param, String param2) throws RestClientExcep * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testJsonFormDataWithHttpInfo(String param, String param2) throws RestClientException { + public ResponseEntity testJsonFormDataWithHttpInfo(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'param' is set @@ -1062,7 +1062,7 @@ public ResponseEntity testJsonFormDataWithHttpInfo(String param, String pa * @param childWithNullable request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testNullable(ChildWithNullable childWithNullable) throws RestClientException { + public void testNullable(@javax.annotation.Nonnull ChildWithNullable childWithNullable) throws RestClientException { testNullableWithHttpInfo(childWithNullable); } @@ -1074,7 +1074,7 @@ public void testNullable(ChildWithNullable childWithNullable) throws RestClientE * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws RestClientException { + public ResponseEntity testNullableWithHttpInfo(@javax.annotation.Nonnull ChildWithNullable childWithNullable) throws RestClientException { Object localVarPostBody = childWithNullable; // verify the required parameter 'childWithNullable' is set @@ -1113,7 +1113,7 @@ public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWith * @param language (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + public void testQueryParameterCollectionFormat(@javax.annotation.Nonnull List pipe, @javax.annotation.Nonnull List ioutil, @javax.annotation.Nonnull List http, @javax.annotation.Nonnull List url, @javax.annotation.Nonnull List context, @javax.annotation.Nonnull String allowEmpty, @javax.annotation.Nullable Map language) throws RestClientException { testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); } @@ -1131,7 +1131,7 @@ public void testQueryParameterCollectionFormat(List pipe, List i * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(@javax.annotation.Nonnull List pipe, @javax.annotation.Nonnull List ioutil, @javax.annotation.Nonnull List http, @javax.annotation.Nonnull List url, @javax.annotation.Nonnull List context, @javax.annotation.Nonnull String allowEmpty, @javax.annotation.Nullable Map language) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -1196,7 +1196,7 @@ public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List< * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testStringMapReference(Map requestBody) throws RestClientException { + public void testStringMapReference(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testStringMapReferenceWithHttpInfo(requestBody); } @@ -1208,7 +1208,7 @@ public void testStringMapReference(Map requestBody) throws RestC * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testStringMapReferenceWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testStringMapReferenceWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 9f560f1a5ca1..2975dde1f524 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -45,7 +45,7 @@ public FakeClassnameTags123Api(ApiClient apiClient) { * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClassname(Client client) throws RestClientException { + public Client testClassname(@javax.annotation.Nonnull Client client) throws RestClientException { return testClassnameWithHttpInfo(client).getBody(); } @@ -57,7 +57,7 @@ public Client testClassname(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClassnameWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity testClassnameWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index c5b72e2838d1..58c8bced78ae 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -48,7 +48,7 @@ public PetApi(ApiClient apiClient) { * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void addPet(Pet pet) throws RestClientException { + public void addPet(@javax.annotation.Nonnull Pet pet) throws RestClientException { addPetWithHttpInfo(pet); } @@ -61,7 +61,7 @@ public void addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -96,7 +96,7 @@ public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientExcepti * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deletePet(Long petId, String apiKey) throws RestClientException { + public void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { deletePetWithHttpInfo(petId, apiKey); } @@ -110,7 +110,7 @@ public void deletePet(Long petId, String apiKey) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { + public ResponseEntity deletePetWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -149,7 +149,7 @@ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) thr * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public List findPetsByStatus(List status) throws RestClientException { + public List findPetsByStatus(@javax.annotation.Nonnull List status) throws RestClientException { return findPetsByStatusWithHttpInfo(status).getBody(); } @@ -162,7 +162,7 @@ public List findPetsByStatus(List status) throws RestClientExceptio * @return ResponseEntity<List<Pet>> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { + public ResponseEntity> findPetsByStatusWithHttpInfo(@javax.annotation.Nonnull List status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -202,7 +202,7 @@ public ResponseEntity> findPetsByStatusWithHttpInfo(List statu * @deprecated */ @Deprecated - public Set findPetsByTags(Set tags) throws RestClientException { + public Set findPetsByTags(@javax.annotation.Nonnull Set tags) throws RestClientException { return findPetsByTagsWithHttpInfo(tags).getBody(); } @@ -217,7 +217,7 @@ public Set findPetsByTags(Set tags) throws RestClientException { * @deprecated */ @Deprecated - public ResponseEntity> findPetsByTagsWithHttpInfo(Set tags) throws RestClientException { + public ResponseEntity> findPetsByTagsWithHttpInfo(@javax.annotation.Nonnull Set tags) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -256,7 +256,7 @@ public ResponseEntity> findPetsByTagsWithHttpInfo(Set tags) thr * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet getPetById(Long petId) throws RestClientException { + public Pet getPetById(@javax.annotation.Nonnull Long petId) throws RestClientException { return getPetByIdWithHttpInfo(petId).getBody(); } @@ -270,7 +270,7 @@ public Pet getPetById(Long petId) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { + public ResponseEntity getPetByIdWithHttpInfo(@javax.annotation.Nonnull Long petId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -309,7 +309,7 @@ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientE * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePet(Pet pet) throws RestClientException { + public void updatePet(@javax.annotation.Nonnull Pet pet) throws RestClientException { updatePetWithHttpInfo(pet); } @@ -324,7 +324,7 @@ public void updatePet(Pet pet) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity updatePetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -360,7 +360,7 @@ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientExce * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + public void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { updatePetWithFormWithHttpInfo(petId, name, status); } @@ -375,7 +375,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Res * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { + public ResponseEntity updatePetWithFormWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -419,7 +419,7 @@ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String nam * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ModelApiResponse uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getBody(); } @@ -433,7 +433,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ResponseEntity uploadFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -479,7 +479,7 @@ public ResponseEntity uploadFileWithHttpInfo(Long petId, Strin * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + public ModelApiResponse uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws RestClientException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getBody(); } @@ -493,7 +493,7 @@ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 615a3cbf5ba3..04381b6658be 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -45,7 +45,7 @@ public StoreApi(ApiClient apiClient) { * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteOrder(String orderId) throws RestClientException { + public void deleteOrder(@javax.annotation.Nonnull String orderId) throws RestClientException { deleteOrderWithHttpInfo(orderId); } @@ -58,7 +58,7 @@ public void deleteOrder(String orderId) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { + public ResponseEntity deleteOrderWithHttpInfo(@javax.annotation.Nonnull String orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -134,7 +134,7 @@ public ResponseEntity> getInventoryWithHttpInfo() throws Re * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order getOrderById(Long orderId) throws RestClientException { + public Order getOrderById(@javax.annotation.Nonnull Long orderId) throws RestClientException { return getOrderByIdWithHttpInfo(orderId).getBody(); } @@ -148,7 +148,7 @@ public Order getOrderById(Long orderId) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { + public ResponseEntity getOrderByIdWithHttpInfo(@javax.annotation.Nonnull Long orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -186,7 +186,7 @@ public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestC * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order order) throws RestClientException { + public Order placeOrder(@javax.annotation.Nonnull Order order) throws RestClientException { return placeOrderWithHttpInfo(order).getBody(); } @@ -199,7 +199,7 @@ public Order placeOrder(Order order) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + public ResponseEntity placeOrderWithHttpInfo(@javax.annotation.Nonnull Order order) throws RestClientException { Object localVarPostBody = order; // verify the required parameter 'order' is set diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 1dcd28332b06..b1e341816965 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -45,7 +45,7 @@ public UserApi(ApiClient apiClient) { * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User user) throws RestClientException { + public void createUser(@javax.annotation.Nonnull User user) throws RestClientException { createUserWithHttpInfo(user); } @@ -57,7 +57,7 @@ public void createUser(User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + public ResponseEntity createUserWithHttpInfo(@javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -90,7 +90,7 @@ public ResponseEntity createUserWithHttpInfo(User user) throws RestClientE * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List user) throws RestClientException { + public void createUsersWithArrayInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithArrayInputWithHttpInfo(user); } @@ -102,7 +102,7 @@ public void createUsersWithArrayInput(List user) throws RestClientExceptio * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -135,7 +135,7 @@ public ResponseEntity createUsersWithArrayInputWithHttpInfo(List use * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List user) throws RestClientException { + public void createUsersWithListInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithListInputWithHttpInfo(user); } @@ -147,7 +147,7 @@ public void createUsersWithListInput(List user) throws RestClientException * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithListInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -181,7 +181,7 @@ public ResponseEntity createUsersWithListInputWithHttpInfo(List user * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteUser(String username) throws RestClientException { + public void deleteUser(@javax.annotation.Nonnull String username) throws RestClientException { deleteUserWithHttpInfo(username); } @@ -194,7 +194,7 @@ public void deleteUser(String username) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { + public ResponseEntity deleteUserWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -231,7 +231,7 @@ public ResponseEntity deleteUserWithHttpInfo(String username) throws RestC * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User getUserByName(String username) throws RestClientException { + public User getUserByName(@javax.annotation.Nonnull String username) throws RestClientException { return getUserByNameWithHttpInfo(username).getBody(); } @@ -245,7 +245,7 @@ public User getUserByName(String username) throws RestClientException { * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { + public ResponseEntity getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -284,7 +284,7 @@ public ResponseEntity getUserByNameWithHttpInfo(String username) throws Re * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String loginUser(String username, String password) throws RestClientException { + public String loginUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { return loginUserWithHttpInfo(username, password).getBody(); } @@ -298,7 +298,7 @@ public String loginUser(String username, String password) throws RestClientExcep * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { + public ResponseEntity loginUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -378,7 +378,7 @@ public ResponseEntity logoutUserWithHttpInfo() throws RestClientException * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User user) throws RestClientException { + public void updateUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { updateUserWithHttpInfo(username, user); } @@ -392,7 +392,7 @@ public void updateUser(String username, User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + public ResponseEntity updateUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'username' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 0307e5febcbf..d4a87120a76b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -45,7 +45,7 @@ public AnotherFakeApi(ApiClient apiClient) { * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(Client client) throws RestClientException { + public Client call123testSpecialTags(@javax.annotation.Nonnull Client client) throws RestClientException { return call123testSpecialTagsWithHttpInfo(client).getBody(); } @@ -57,7 +57,7 @@ public Client call123testSpecialTags(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity call123testSpecialTagsWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 729ffb7db428..3366149610e2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -138,7 +138,7 @@ public ResponseEntity fakeHealthGetWithHttpInfo() throws Rest * @param header1 header parameter (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws RestClientException { + public void fakeHttpSignatureTest(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1) throws RestClientException { fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); } @@ -152,7 +152,7 @@ public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws RestClientException { + public ResponseEntity fakeHttpSignatureTestWithHttpInfo(@javax.annotation.Nonnull Pet pet, @javax.annotation.Nullable String query1, @javax.annotation.Nullable String header1) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -192,7 +192,7 @@ public ResponseEntity fakeHttpSignatureTestWithHttpInfo(Pet pet, String qu * @return Boolean * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientException { + public Boolean fakeOuterBooleanSerialize(@javax.annotation.Nullable Boolean body) throws RestClientException { return fakeOuterBooleanSerializeWithHttpInfo(body).getBody(); } @@ -204,7 +204,7 @@ public Boolean fakeOuterBooleanSerialize(Boolean body) throws RestClientExceptio * @return ResponseEntity<Boolean> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws RestClientException { + public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(@javax.annotation.Nullable Boolean body) throws RestClientException { Object localVarPostBody = body; @@ -235,7 +235,7 @@ public ResponseEntity fakeOuterBooleanSerializeWithHttpInfo(Boolean bod * @return OuterComposite * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws RestClientException { + public OuterComposite fakeOuterCompositeSerialize(@javax.annotation.Nullable OuterComposite outerComposite) throws RestClientException { return fakeOuterCompositeSerializeWithHttpInfo(outerComposite).getBody(); } @@ -247,7 +247,7 @@ public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) * @return ResponseEntity<OuterComposite> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws RestClientException { + public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(@javax.annotation.Nullable OuterComposite outerComposite) throws RestClientException { Object localVarPostBody = outerComposite; @@ -278,7 +278,7 @@ public ResponseEntity fakeOuterCompositeSerializeWithHttpInfo(Ou * @return BigDecimal * @throws RestClientException if an error occurs while attempting to invoke the API */ - public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientException { + public BigDecimal fakeOuterNumberSerialize(@javax.annotation.Nullable BigDecimal body) throws RestClientException { return fakeOuterNumberSerializeWithHttpInfo(body).getBody(); } @@ -290,7 +290,7 @@ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws RestClientExc * @return ResponseEntity<BigDecimal> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws RestClientException { + public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(@javax.annotation.Nullable BigDecimal body) throws RestClientException { Object localVarPostBody = body; @@ -321,7 +321,7 @@ public ResponseEntity fakeOuterNumberSerializeWithHttpInfo(BigDecima * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String fakeOuterStringSerialize(String body) throws RestClientException { + public String fakeOuterStringSerialize(@javax.annotation.Nullable String body) throws RestClientException { return fakeOuterStringSerializeWithHttpInfo(body).getBody(); } @@ -333,7 +333,7 @@ public String fakeOuterStringSerialize(String body) throws RestClientException { * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) throws RestClientException { + public ResponseEntity fakeOuterStringSerializeWithHttpInfo(@javax.annotation.Nullable String body) throws RestClientException { Object localVarPostBody = body; @@ -364,7 +364,7 @@ public ResponseEntity fakeOuterStringSerializeWithHttpInfo(String body) * @return OuterObjectWithEnumProperty * @throws RestClientException if an error occurs while attempting to invoke the API */ - public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(@javax.annotation.Nonnull OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { return fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty).getBody(); } @@ -376,7 +376,7 @@ public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectW * @return ResponseEntity<OuterObjectWithEnumProperty> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { + public ResponseEntity fakePropertyEnumIntegerSerializeWithHttpInfo(@javax.annotation.Nonnull OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws RestClientException { Object localVarPostBody = outerObjectWithEnumProperty; // verify the required parameter 'outerObjectWithEnumProperty' is set @@ -411,7 +411,7 @@ public ResponseEntity fakePropertyEnumIntegerSerial * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testAdditionalPropertiesReference(Map requestBody) throws RestClientException { + public void testAdditionalPropertiesReference(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testAdditionalPropertiesReferenceWithHttpInfo(requestBody); } @@ -423,7 +423,7 @@ public void testAdditionalPropertiesReference(Map requestBody) t * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set @@ -456,7 +456,7 @@ public ResponseEntity testAdditionalPropertiesReferenceWithHttpInfo(Map testBodyWithBinaryWithHttpInfo(File body) throws RestClientException { + public ResponseEntity testBodyWithBinaryWithHttpInfo(@javax.annotation.Nullable File body) throws RestClientException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -501,7 +501,7 @@ public ResponseEntity testBodyWithBinaryWithHttpInfo(File body) throws Res * @param fileSchemaTestClass (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + public void testBodyWithFileSchema(@javax.annotation.Nonnull FileSchemaTestClass fileSchemaTestClass) throws RestClientException { testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); } @@ -513,7 +513,7 @@ public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) thro * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws RestClientException { + public ResponseEntity testBodyWithFileSchemaWithHttpInfo(@javax.annotation.Nonnull FileSchemaTestClass fileSchemaTestClass) throws RestClientException { Object localVarPostBody = fileSchemaTestClass; // verify the required parameter 'fileSchemaTestClass' is set @@ -547,7 +547,7 @@ public ResponseEntity testBodyWithFileSchemaWithHttpInfo(FileSchemaTestCla * @param user (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testBodyWithQueryParams(String query, User user) throws RestClientException { + public void testBodyWithQueryParams(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User user) throws RestClientException { testBodyWithQueryParamsWithHttpInfo(query, user); } @@ -560,7 +560,7 @@ public void testBodyWithQueryParams(String query, User user) throws RestClientEx * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, User user) throws RestClientException { + public ResponseEntity testBodyWithQueryParamsWithHttpInfo(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'query' is set @@ -602,7 +602,7 @@ public ResponseEntity testBodyWithQueryParamsWithHttpInfo(String query, Us * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClientModel(Client client) throws RestClientException { + public Client testClientModel(@javax.annotation.Nonnull Client client) throws RestClientException { return testClientModelWithHttpInfo(client).getBody(); } @@ -614,7 +614,7 @@ public Client testClientModel(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClientModelWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity testClientModelWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set @@ -663,7 +663,7 @@ public ResponseEntity testClientModelWithHttpInfo(Client client) throws * @param paramCallback None (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + public void testEndpointParameters(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable OffsetDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws RestClientException { testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -689,7 +689,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { + public ResponseEntity testEndpointParametersWithHttpInfo(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable OffsetDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'number' is set @@ -775,7 +775,7 @@ public ResponseEntity testEndpointParametersWithHttpInfo(BigDecimal number * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + public void testEnumParameters(@javax.annotation.Nullable List enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List enumQueryModelArray, @javax.annotation.Nullable List enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws RestClientException { testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } @@ -796,7 +796,7 @@ public void testEnumParameters(List enumHeaderStringArray, String enumHe * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws RestClientException { + public ResponseEntity testEnumParametersWithHttpInfo(@javax.annotation.Nullable List enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List enumQueryModelArray, @javax.annotation.Nullable List enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws RestClientException { Object localVarPostBody = null; @@ -846,7 +846,7 @@ public ResponseEntity testEnumParametersWithHttpInfo(List enumHead * @param int64Group Integer in group parameters (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + public void testGroupParameters(@javax.annotation.Nonnull Integer requiredStringGroup, @javax.annotation.Nonnull Boolean requiredBooleanGroup, @javax.annotation.Nonnull Long requiredInt64Group, @javax.annotation.Nullable Integer stringGroup, @javax.annotation.Nullable Boolean booleanGroup, @javax.annotation.Nullable Long int64Group) throws RestClientException { testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -863,7 +863,7 @@ public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBoo * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws RestClientException { + public ResponseEntity testGroupParametersWithHttpInfo(@javax.annotation.Nonnull Integer requiredStringGroup, @javax.annotation.Nonnull Boolean requiredBooleanGroup, @javax.annotation.Nonnull Long requiredInt64Group, @javax.annotation.Nullable Integer stringGroup, @javax.annotation.Nullable Boolean booleanGroup, @javax.annotation.Nullable Long int64Group) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -915,7 +915,7 @@ public ResponseEntity testGroupParametersWithHttpInfo(Integer requiredStri * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testInlineAdditionalProperties(Map requestBody) throws RestClientException { + public void testInlineAdditionalProperties(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testInlineAdditionalPropertiesWithHttpInfo(requestBody); } @@ -927,7 +927,7 @@ public void testInlineAdditionalProperties(Map requestBody) thro * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set @@ -960,7 +960,7 @@ public ResponseEntity testInlineAdditionalPropertiesWithHttpInfo(Map testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws RestClientException { + public ResponseEntity testInlineFreeformAdditionalPropertiesWithHttpInfo(@javax.annotation.Nonnull TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws RestClientException { Object localVarPostBody = testInlineFreeformAdditionalPropertiesRequest; // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set @@ -1006,7 +1006,7 @@ public ResponseEntity testInlineFreeformAdditionalPropertiesWithHttpInfo(T * @param param2 field2 (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testJsonFormData(String param, String param2) throws RestClientException { + public void testJsonFormData(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws RestClientException { testJsonFormDataWithHttpInfo(param, param2); } @@ -1019,7 +1019,7 @@ public void testJsonFormData(String param, String param2) throws RestClientExcep * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testJsonFormDataWithHttpInfo(String param, String param2) throws RestClientException { + public ResponseEntity testJsonFormDataWithHttpInfo(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'param' is set @@ -1062,7 +1062,7 @@ public ResponseEntity testJsonFormDataWithHttpInfo(String param, String pa * @param childWithNullable request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testNullable(ChildWithNullable childWithNullable) throws RestClientException { + public void testNullable(@javax.annotation.Nonnull ChildWithNullable childWithNullable) throws RestClientException { testNullableWithHttpInfo(childWithNullable); } @@ -1074,7 +1074,7 @@ public void testNullable(ChildWithNullable childWithNullable) throws RestClientE * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWithNullable) throws RestClientException { + public ResponseEntity testNullableWithHttpInfo(@javax.annotation.Nonnull ChildWithNullable childWithNullable) throws RestClientException { Object localVarPostBody = childWithNullable; // verify the required parameter 'childWithNullable' is set @@ -1113,7 +1113,7 @@ public ResponseEntity testNullableWithHttpInfo(ChildWithNullable childWith * @param language (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + public void testQueryParameterCollectionFormat(@javax.annotation.Nonnull List pipe, @javax.annotation.Nonnull List ioutil, @javax.annotation.Nonnull List http, @javax.annotation.Nonnull List url, @javax.annotation.Nonnull List context, @javax.annotation.Nonnull String allowEmpty, @javax.annotation.Nullable Map language) throws RestClientException { testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); } @@ -1131,7 +1131,7 @@ public void testQueryParameterCollectionFormat(List pipe, List i * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws RestClientException { + public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(@javax.annotation.Nonnull List pipe, @javax.annotation.Nonnull List ioutil, @javax.annotation.Nonnull List http, @javax.annotation.Nonnull List url, @javax.annotation.Nonnull List context, @javax.annotation.Nonnull String allowEmpty, @javax.annotation.Nullable Map language) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -1196,7 +1196,7 @@ public ResponseEntity testQueryParameterCollectionFormatWithHttpInfo(List< * @param requestBody request body (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void testStringMapReference(Map requestBody) throws RestClientException { + public void testStringMapReference(@javax.annotation.Nonnull Map requestBody) throws RestClientException { testStringMapReferenceWithHttpInfo(requestBody); } @@ -1208,7 +1208,7 @@ public void testStringMapReference(Map requestBody) throws RestC * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testStringMapReferenceWithHttpInfo(Map requestBody) throws RestClientException { + public ResponseEntity testStringMapReferenceWithHttpInfo(@javax.annotation.Nonnull Map requestBody) throws RestClientException { Object localVarPostBody = requestBody; // verify the required parameter 'requestBody' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 9f560f1a5ca1..2975dde1f524 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -45,7 +45,7 @@ public FakeClassnameTags123Api(ApiClient apiClient) { * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client testClassname(Client client) throws RestClientException { + public Client testClassname(@javax.annotation.Nonnull Client client) throws RestClientException { return testClassnameWithHttpInfo(client).getBody(); } @@ -57,7 +57,7 @@ public Client testClassname(Client client) throws RestClientException { * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity testClassnameWithHttpInfo(Client client) throws RestClientException { + public ResponseEntity testClassnameWithHttpInfo(@javax.annotation.Nonnull Client client) throws RestClientException { Object localVarPostBody = client; // verify the required parameter 'client' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index c5b72e2838d1..58c8bced78ae 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -48,7 +48,7 @@ public PetApi(ApiClient apiClient) { * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void addPet(Pet pet) throws RestClientException { + public void addPet(@javax.annotation.Nonnull Pet pet) throws RestClientException { addPetWithHttpInfo(pet); } @@ -61,7 +61,7 @@ public void addPet(Pet pet) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity addPetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -96,7 +96,7 @@ public ResponseEntity addPetWithHttpInfo(Pet pet) throws RestClientExcepti * @param apiKey (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deletePet(Long petId, String apiKey) throws RestClientException { + public void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { deletePetWithHttpInfo(petId, apiKey); } @@ -110,7 +110,7 @@ public void deletePet(Long petId, String apiKey) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) throws RestClientException { + public ResponseEntity deletePetWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -149,7 +149,7 @@ public ResponseEntity deletePetWithHttpInfo(Long petId, String apiKey) thr * @return List<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public List findPetsByStatus(List status) throws RestClientException { + public List findPetsByStatus(@javax.annotation.Nonnull List status) throws RestClientException { return findPetsByStatusWithHttpInfo(status).getBody(); } @@ -162,7 +162,7 @@ public List findPetsByStatus(List status) throws RestClientExceptio * @return ResponseEntity<List<Pet>> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity> findPetsByStatusWithHttpInfo(List status) throws RestClientException { + public ResponseEntity> findPetsByStatusWithHttpInfo(@javax.annotation.Nonnull List status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -202,7 +202,7 @@ public ResponseEntity> findPetsByStatusWithHttpInfo(List statu * @deprecated */ @Deprecated - public Set findPetsByTags(Set tags) throws RestClientException { + public Set findPetsByTags(@javax.annotation.Nonnull Set tags) throws RestClientException { return findPetsByTagsWithHttpInfo(tags).getBody(); } @@ -217,7 +217,7 @@ public Set findPetsByTags(Set tags) throws RestClientException { * @deprecated */ @Deprecated - public ResponseEntity> findPetsByTagsWithHttpInfo(Set tags) throws RestClientException { + public ResponseEntity> findPetsByTagsWithHttpInfo(@javax.annotation.Nonnull Set tags) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -256,7 +256,7 @@ public ResponseEntity> findPetsByTagsWithHttpInfo(Set tags) thr * @return Pet * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Pet getPetById(Long petId) throws RestClientException { + public Pet getPetById(@javax.annotation.Nonnull Long petId) throws RestClientException { return getPetByIdWithHttpInfo(petId).getBody(); } @@ -270,7 +270,7 @@ public Pet getPetById(Long petId) throws RestClientException { * @return ResponseEntity<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientException { + public ResponseEntity getPetByIdWithHttpInfo(@javax.annotation.Nonnull Long petId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -309,7 +309,7 @@ public ResponseEntity getPetByIdWithHttpInfo(Long petId) throws RestClientE * @param pet Pet object that needs to be added to the store (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePet(Pet pet) throws RestClientException { + public void updatePet(@javax.annotation.Nonnull Pet pet) throws RestClientException { updatePetWithHttpInfo(pet); } @@ -324,7 +324,7 @@ public void updatePet(Pet pet) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { + public ResponseEntity updatePetWithHttpInfo(@javax.annotation.Nonnull Pet pet) throws RestClientException { Object localVarPostBody = pet; // verify the required parameter 'pet' is set @@ -360,7 +360,7 @@ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientExce * @param status Updated status of the pet (optional) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { + public void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { updatePetWithFormWithHttpInfo(petId, name, status); } @@ -375,7 +375,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Res * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException { + public ResponseEntity updatePetWithFormWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -419,7 +419,7 @@ public ResponseEntity updatePetWithFormWithHttpInfo(Long petId, String nam * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ModelApiResponse uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getBody(); } @@ -433,7 +433,7 @@ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _ * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws RestClientException { + public ResponseEntity uploadFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -479,7 +479,7 @@ public ResponseEntity uploadFileWithHttpInfo(Long petId, Strin * @return ModelApiResponse * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + public ModelApiResponse uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws RestClientException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getBody(); } @@ -493,7 +493,7 @@ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile * @return ResponseEntity<ModelApiResponse> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws RestClientException { + public ResponseEntity uploadFileWithRequiredFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'petId' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 615a3cbf5ba3..04381b6658be 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -45,7 +45,7 @@ public StoreApi(ApiClient apiClient) { * @param orderId ID of the order that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteOrder(String orderId) throws RestClientException { + public void deleteOrder(@javax.annotation.Nonnull String orderId) throws RestClientException { deleteOrderWithHttpInfo(orderId); } @@ -58,7 +58,7 @@ public void deleteOrder(String orderId) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteOrderWithHttpInfo(String orderId) throws RestClientException { + public ResponseEntity deleteOrderWithHttpInfo(@javax.annotation.Nonnull String orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -134,7 +134,7 @@ public ResponseEntity> getInventoryWithHttpInfo() throws Re * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order getOrderById(Long orderId) throws RestClientException { + public Order getOrderById(@javax.annotation.Nonnull Long orderId) throws RestClientException { return getOrderByIdWithHttpInfo(orderId).getBody(); } @@ -148,7 +148,7 @@ public Order getOrderById(Long orderId) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestClientException { + public ResponseEntity getOrderByIdWithHttpInfo(@javax.annotation.Nonnull Long orderId) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -186,7 +186,7 @@ public ResponseEntity getOrderByIdWithHttpInfo(Long orderId) throws RestC * @return Order * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Order placeOrder(Order order) throws RestClientException { + public Order placeOrder(@javax.annotation.Nonnull Order order) throws RestClientException { return placeOrderWithHttpInfo(order).getBody(); } @@ -199,7 +199,7 @@ public Order placeOrder(Order order) throws RestClientException { * @return ResponseEntity<Order> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity placeOrderWithHttpInfo(Order order) throws RestClientException { + public ResponseEntity placeOrderWithHttpInfo(@javax.annotation.Nonnull Order order) throws RestClientException { Object localVarPostBody = order; // verify the required parameter 'order' is set diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 1dcd28332b06..b1e341816965 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -45,7 +45,7 @@ public UserApi(ApiClient apiClient) { * @param user Created user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUser(User user) throws RestClientException { + public void createUser(@javax.annotation.Nonnull User user) throws RestClientException { createUserWithHttpInfo(user); } @@ -57,7 +57,7 @@ public void createUser(User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUserWithHttpInfo(User user) throws RestClientException { + public ResponseEntity createUserWithHttpInfo(@javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -90,7 +90,7 @@ public ResponseEntity createUserWithHttpInfo(User user) throws RestClientE * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithArrayInput(List user) throws RestClientException { + public void createUsersWithArrayInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithArrayInputWithHttpInfo(user); } @@ -102,7 +102,7 @@ public void createUsersWithArrayInput(List user) throws RestClientExceptio * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithArrayInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithArrayInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -135,7 +135,7 @@ public ResponseEntity createUsersWithArrayInputWithHttpInfo(List use * @param user List of user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void createUsersWithListInput(List user) throws RestClientException { + public void createUsersWithListInput(@javax.annotation.Nonnull List user) throws RestClientException { createUsersWithListInputWithHttpInfo(user); } @@ -147,7 +147,7 @@ public void createUsersWithListInput(List user) throws RestClientException * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity createUsersWithListInputWithHttpInfo(List user) throws RestClientException { + public ResponseEntity createUsersWithListInputWithHttpInfo(@javax.annotation.Nonnull List user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'user' is set @@ -181,7 +181,7 @@ public ResponseEntity createUsersWithListInputWithHttpInfo(List user * @param username The name that needs to be deleted (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void deleteUser(String username) throws RestClientException { + public void deleteUser(@javax.annotation.Nonnull String username) throws RestClientException { deleteUserWithHttpInfo(username); } @@ -194,7 +194,7 @@ public void deleteUser(String username) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity deleteUserWithHttpInfo(String username) throws RestClientException { + public ResponseEntity deleteUserWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -231,7 +231,7 @@ public ResponseEntity deleteUserWithHttpInfo(String username) throws RestC * @return User * @throws RestClientException if an error occurs while attempting to invoke the API */ - public User getUserByName(String username) throws RestClientException { + public User getUserByName(@javax.annotation.Nonnull String username) throws RestClientException { return getUserByNameWithHttpInfo(username).getBody(); } @@ -245,7 +245,7 @@ public User getUserByName(String username) throws RestClientException { * @return ResponseEntity<User> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity getUserByNameWithHttpInfo(String username) throws RestClientException { + public ResponseEntity getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -284,7 +284,7 @@ public ResponseEntity getUserByNameWithHttpInfo(String username) throws Re * @return String * @throws RestClientException if an error occurs while attempting to invoke the API */ - public String loginUser(String username, String password) throws RestClientException { + public String loginUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { return loginUserWithHttpInfo(username, password).getBody(); } @@ -298,7 +298,7 @@ public String loginUser(String username, String password) throws RestClientExcep * @return ResponseEntity<String> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity loginUserWithHttpInfo(String username, String password) throws RestClientException { + public ResponseEntity loginUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws RestClientException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -378,7 +378,7 @@ public ResponseEntity logoutUserWithHttpInfo() throws RestClientException * @param user Updated user object (required) * @throws RestClientException if an error occurs while attempting to invoke the API */ - public void updateUser(String username, User user) throws RestClientException { + public void updateUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { updateUserWithHttpInfo(username, user); } @@ -392,7 +392,7 @@ public void updateUser(String username, User user) throws RestClientException { * @return ResponseEntity<Void> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity updateUserWithHttpInfo(String username, User user) throws RestClientException { + public ResponseEntity updateUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User user) throws RestClientException { Object localVarPostBody = user; // verify the required parameter 'username' is set diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs index 0ba89c7485d9..1e24c1f74b0e 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs @@ -318,6 +318,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(e.to_string())) .expect("Unable to create Bad Request response due to unable to read content-type header for MultipartRelatedRequestPost")); } @@ -330,6 +331,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Could not read multipart body for MultipartRelatedRequestPost: {e}"))) .expect("Unable to create Bad Request response due to unable to read multipart body for MultipartRelatedRequestPost")); } @@ -353,6 +355,7 @@ where Ok(json_data) => json_data, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter models::MultipartRequestObjectField - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter models::MultipartRequestObjectField due to schema")) }; @@ -384,6 +387,7 @@ where Some(x) => x, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required multipart/related parameter required_binary_field".to_string())) .expect("Unable to create Bad Request response for missing multipart/related parameter required_binary_field due to schema")) }; @@ -418,6 +422,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -426,6 +434,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -458,6 +467,7 @@ where Some(boundary) => boundary.to_string(), None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Couldn't find valid multipart body".to_string())) .expect("Unable to create Bad Request response for incorrect boundary")), }; @@ -476,30 +486,35 @@ where SaveResult::Partial(_, PartialReason::CountLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive parts".to_string())) .expect("Unable to create Bad Request response due to excessive parts")) }, SaveResult::Partial(_, PartialReason::SizeLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive data".to_string())) .expect("Unable to create Bad Request response due to excessive data")) }, SaveResult::Partial(_, PartialReason::Utf8Error(_)) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to invalid data".to_string())) .expect("Unable to create Bad Request response due to invalid data")) }, SaveResult::Partial(_, PartialReason::IoError(_)) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process message part due an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, SaveResult::Error(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process all message parts due to an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, @@ -516,6 +531,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("string_field data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter string_field")) } @@ -526,6 +542,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required form parameter string_field".to_string())) .expect("Unable to create Bad Request due to missing required form parameter string_field")) } @@ -543,6 +560,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("optional_string_field data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter optional_string_field")) } @@ -567,6 +585,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("object_field data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter object_field")) } @@ -590,6 +609,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required form parameter binary_field".to_string())) .expect("Unable to create Bad Request due to missing required form parameter binary_field")) } @@ -620,6 +640,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -628,6 +652,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -665,6 +690,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(e.to_string())) .expect("Unable to create Bad Request response due to unable to read content-type header for MultipleIdenticalMimeTypesPost")); } @@ -677,6 +703,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Could not read multipart body for MultipleIdenticalMimeTypesPost: {e}"))) .expect("Unable to create Bad Request response due to unable to read multipart body for MultipleIdenticalMimeTypesPost")); } @@ -740,6 +767,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -748,6 +779,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs index 301b00356fbc..1f967d71905f 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/server/mod.rs @@ -268,6 +268,7 @@ where Ok(param_op_get_request) => param_op_get_request, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter OpGetRequest - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter OpGetRequest due to schema")), } @@ -279,6 +280,7 @@ where Some(param_op_get_request) => param_op_get_request, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter OpGetRequest".to_string())) .expect("Unable to create Bad Request response for missing body parameter OpGetRequest")), }; @@ -313,6 +315,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -321,6 +327,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs index 963414318c2e..ebce98be1385 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/client/callbacks.rs @@ -292,6 +292,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header Information - {err}"))) .expect("Unable to create Bad Request response for invalid header Information")); @@ -325,6 +326,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -380,6 +385,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs index 98631aeb469a..a28b2189f240 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs @@ -627,6 +627,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -663,6 +667,7 @@ where Ok(param_url) => Some(param_url), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter url - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter url")), } @@ -673,6 +678,7 @@ where Some(param_url) => param_url, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter url")) .expect("Unable to create Bad Request response for missing query parameter url")), }; @@ -699,6 +705,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -755,6 +765,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -818,6 +832,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -876,6 +894,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -884,6 +906,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -918,6 +941,7 @@ where Ok(param_iambool) => Some(param_iambool), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter iambool - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter iambool")), } @@ -928,6 +952,7 @@ where Some(param_iambool) => param_iambool, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter iambool")) .expect("Unable to create Bad Request response for missing query parameter iambool")), }; @@ -954,6 +979,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -990,6 +1019,7 @@ where Ok(param_list_of_strings) => Some(param_list_of_strings), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter list-of-strings - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter list-of-strings")), } @@ -1019,6 +1049,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1052,6 +1086,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header X-Header - {err}"))) .expect("Unable to create Bad Request response for invalid header X-Header")); @@ -1060,6 +1095,7 @@ where None => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required header X-Header")) .expect("Unable to create Bad Request response for missing required header X-Header")); } @@ -1087,6 +1123,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1138,6 +1178,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1259,6 +1303,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1287,6 +1335,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -1302,6 +1351,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -1333,6 +1383,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1372,6 +1426,7 @@ where Ok(param_object_param) => param_object_param, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter ObjectParam - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter ObjectParam due to schema")), } @@ -1383,6 +1438,7 @@ where Some(param_object_param) => param_object_param, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter ObjectParam".to_string())) .expect("Unable to create Bad Request response for missing body parameter ObjectParam")), }; @@ -1447,6 +1503,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1455,6 +1515,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1504,6 +1565,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1548,6 +1613,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1584,6 +1653,7 @@ where Ok(param_uuid) => Some(param_uuid), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter uuid - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter uuid")), } @@ -1601,6 +1671,7 @@ where Ok(param_some_object) => Some(param_some_object), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter someObject - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter someObject")), } @@ -1620,6 +1691,7 @@ where Ok(param_some_list) => Some(param_some_list), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter someList - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter someList")), } @@ -1660,6 +1732,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1696,6 +1772,7 @@ where Ok(param_required_no_example) => Some(param_required_no_example), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter required_no_example - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter required_no_example")), } @@ -1706,6 +1783,7 @@ where Some(param_required_no_example) => param_required_no_example, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter required_no_example")) .expect("Unable to create Bad Request response for missing query parameter required_no_example")), }; @@ -1720,6 +1798,7 @@ where Ok(param_required_with_example) => Some(param_required_with_example), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter required_with_example - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter required_with_example")), } @@ -1730,6 +1809,7 @@ where Some(param_required_with_example) => param_required_with_example, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter required_with_example")) .expect("Unable to create Bad Request response for missing query parameter required_with_example")), }; @@ -1757,6 +1837,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1785,6 +1869,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -1799,6 +1884,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -1830,6 +1916,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1866,6 +1956,7 @@ where Ok(param_url) => Some(param_url), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter url - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter url")), } @@ -1876,6 +1967,7 @@ where Some(param_url) => param_url, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter url")) .expect("Unable to create Bad Request response for missing query parameter url")), }; @@ -1902,6 +1994,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1940,6 +2036,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -1966,6 +2063,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1974,6 +2075,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2010,6 +2112,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -2036,6 +2139,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2044,6 +2151,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2091,6 +2199,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling success_info header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -2107,6 +2216,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling bool_header header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -2124,6 +2234,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling object_header header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -2156,6 +2267,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling further_info header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -2173,6 +2285,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling failure_info header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -2190,6 +2303,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2265,6 +2382,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2298,6 +2419,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header x-header-one - {err}"))) .expect("Unable to create Bad Request response for invalid header x-header-one")); @@ -2316,6 +2438,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header x-header-two - {err}"))) .expect("Unable to create Bad Request response for invalid header x-header-two")); @@ -2349,6 +2472,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2420,6 +2547,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2428,6 +2559,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2477,6 +2609,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2553,6 +2689,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2561,6 +2701,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2645,6 +2786,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2653,6 +2798,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2727,6 +2873,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2735,6 +2885,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2809,6 +2960,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2817,6 +2972,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2891,6 +3047,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2899,6 +3059,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2934,11 +3095,13 @@ where Ok(param_path_param) => param_path_param, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter path_param: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["path_param"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -2965,6 +3128,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3002,11 +3169,13 @@ where Ok(param_path_param_a) => param_path_param_a, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter path_param_a: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["path_param_a"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3016,11 +3185,13 @@ where Ok(param_path_param_b) => param_path_param_b, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter path_param_b: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["path_param_b"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3048,6 +3219,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3087,6 +3262,7 @@ where Ok(param_object_param) => param_object_param, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter ObjectParam - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter ObjectParam due to schema")), } @@ -3098,6 +3274,7 @@ where Some(param_object_param) => param_object_param, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter ObjectParam".to_string())) .expect("Unable to create Bad Request response for missing body parameter ObjectParam")), }; @@ -3132,6 +3309,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3140,6 +3321,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3175,11 +3357,13 @@ where Ok(param_repo_id) => param_repo_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter repoId: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["repoId"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3213,6 +3397,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs index a2bb94a0b38f..1ba53359dc34 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs @@ -597,6 +597,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -641,6 +645,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -685,6 +693,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -729,6 +741,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -773,6 +789,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -817,6 +837,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -861,6 +885,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -905,6 +933,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -949,6 +981,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -993,6 +1029,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1037,6 +1077,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1081,6 +1125,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1125,6 +1173,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1169,6 +1221,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1213,6 +1269,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1257,6 +1317,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1301,6 +1365,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1345,6 +1413,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1389,6 +1461,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1433,6 +1509,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1477,6 +1557,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1521,6 +1605,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1565,6 +1653,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1609,6 +1701,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1653,6 +1749,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1697,6 +1797,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1741,6 +1845,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1785,6 +1893,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1829,6 +1941,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1873,6 +1989,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1917,6 +2037,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1961,6 +2085,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2005,6 +2133,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2049,6 +2181,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2093,6 +2229,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2137,6 +2277,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2181,6 +2325,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } diff --git a/samples/server/petstore/rust-server/output/overlapping-auth-schemes/src/server/mod.rs b/samples/server/petstore/rust-server/output/overlapping-auth-schemes/src/server/mod.rs index 701c40d5f073..4ac45199b594 100644 --- a/samples/server/petstore/rust-server/output/overlapping-auth-schemes/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/overlapping-auth-schemes/src/server/mod.rs @@ -257,6 +257,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -283,6 +284,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index dccb0da9b543..a1ebadb2ca9f 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -612,6 +612,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -623,6 +624,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -664,6 +666,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -672,6 +678,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -715,6 +722,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -794,6 +805,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -802,6 +817,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -879,6 +895,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -887,6 +907,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -964,6 +985,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -972,6 +997,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1049,6 +1075,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1057,6 +1087,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1100,6 +1131,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1137,6 +1172,7 @@ where Ok(param_query) => Some(param_query), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter query - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter query")), } @@ -1147,6 +1183,7 @@ where Some(param_query) => param_query, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter query")) .expect("Unable to create Bad Request response for missing query parameter query")), }; @@ -1167,6 +1204,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -1178,6 +1216,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -1213,6 +1252,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1221,6 +1264,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1259,6 +1303,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -1270,6 +1315,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -1311,6 +1357,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1319,6 +1369,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1346,6 +1397,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -1427,6 +1479,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1435,6 +1491,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1467,6 +1524,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header enum_header_string_array - {err}"))) .expect("Unable to create Bad Request response for invalid header enum_header_string_array")); @@ -1485,6 +1543,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header enum_header_string - {err}"))) .expect("Unable to create Bad Request response for invalid header enum_header_string")); @@ -1516,6 +1575,7 @@ where Ok(param_enum_query_string) => Some(param_enum_query_string), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter enum_query_string - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter enum_query_string")), } @@ -1535,6 +1595,7 @@ where Ok(param_enum_query_integer) => Some(param_enum_query_integer), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter enum_query_integer - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter enum_query_integer")), } @@ -1554,6 +1615,7 @@ where Ok(param_enum_query_double) => Some(param_enum_query_double), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter enum_query_double - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter enum_query_double")), } @@ -1606,6 +1668,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1614,6 +1680,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1652,6 +1719,7 @@ where Ok(param_param) => param_param, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter param - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter param due to schema")), } @@ -1663,6 +1731,7 @@ where Some(param_param) => param_param, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter param".to_string())) .expect("Unable to create Bad Request response for missing body parameter param")), }; @@ -1695,6 +1764,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1703,6 +1776,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1760,6 +1834,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1768,6 +1846,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1804,11 +1883,13 @@ where Ok(param_hyphen_param) => param_hyphen_param, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter hyphen-param: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["hyphen-param"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -1835,6 +1916,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1864,6 +1949,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -1885,6 +1971,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -1896,6 +1983,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -1937,6 +2025,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -1945,6 +2037,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -1972,6 +2065,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -1987,6 +2081,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2013,6 +2108,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -2024,6 +2120,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -2058,6 +2155,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2066,6 +2167,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2093,6 +2195,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2108,6 +2211,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2170,6 +2274,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2199,6 +2307,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2214,6 +2323,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2276,6 +2386,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2305,6 +2419,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2320,6 +2435,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2346,6 +2462,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -2357,6 +2474,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -2401,6 +2519,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2409,6 +2531,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2436,6 +2559,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2451,6 +2575,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2475,11 +2600,13 @@ where Ok(param_pet_id) => param_pet_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter petId: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -2494,6 +2621,7 @@ where Err(err) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Invalid header api_key - {err}"))) .expect("Unable to create Bad Request response for invalid header api_key")); @@ -2527,6 +2655,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2556,6 +2688,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2575,11 +2708,13 @@ where Ok(param_pet_id) => param_pet_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter petId: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -2635,6 +2770,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2664,6 +2803,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2679,6 +2819,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2703,11 +2844,13 @@ where Ok(param_pet_id) => param_pet_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter petId: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -2748,6 +2891,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2756,6 +2903,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -2783,6 +2931,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -2798,6 +2947,7 @@ where let missing_scopes = required_scopes.difference(scopes); return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(missing_scopes.fold( "Insufficient authorization, missing scopes".to_string(), |s, scope| format!("{s} {scope}")) @@ -2822,11 +2972,13 @@ where Ok(param_pet_id) => param_pet_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter petId: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -2841,6 +2993,7 @@ where Some(boundary) => boundary.to_string(), None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Couldn't find valid multipart body".to_string())) .expect("Unable to create Bad Request response for incorrect boundary")), }; @@ -2859,30 +3012,35 @@ where SaveResult::Partial(_, PartialReason::CountLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive parts".to_string())) .expect("Unable to create Bad Request response due to excessive parts")) }, SaveResult::Partial(_, PartialReason::SizeLimit) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to excessive data".to_string())) .expect("Unable to create Bad Request response due to excessive data")) }, SaveResult::Partial(_, PartialReason::Utf8Error(_)) => { return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Unable to process message part due to invalid data".to_string())) .expect("Unable to create Bad Request response due to invalid data")) }, SaveResult::Partial(_, PartialReason::IoError(_)) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process message part due an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, SaveResult::Error(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Failed to process all message parts due to an internal error".to_string())) .expect("Unable to create Internal Server Error response due to an internal error")) }, @@ -2900,6 +3058,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("additional_metadata data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter additional_metadata")) } @@ -2924,6 +3083,7 @@ where return Ok( Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("file data does not match API definition : {e}"))) .expect("Unable to create Bad Request due to missing required form parameter file")) } @@ -2967,6 +3127,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -2975,6 +3139,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3002,6 +3167,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -3035,6 +3201,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3075,6 +3245,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -3086,6 +3257,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -3144,6 +3316,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3152,6 +3328,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3188,11 +3365,13 @@ where Ok(param_order_id) => param_order_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter order_id: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["order_id"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3224,6 +3403,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3262,11 +3445,13 @@ where Ok(param_order_id) => param_order_id, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter order_id: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["order_id"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3322,6 +3507,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3362,6 +3551,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -3373,6 +3563,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -3407,6 +3598,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3415,6 +3610,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3453,6 +3649,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -3464,6 +3661,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -3498,6 +3696,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3506,6 +3708,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3544,6 +3747,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -3555,6 +3759,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -3589,6 +3794,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3597,6 +3806,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -3632,6 +3842,7 @@ where Ok(param_username) => Some(param_username), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter username - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter username")), } @@ -3642,6 +3853,7 @@ where Some(param_username) => param_username, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter username")) .expect("Unable to create Bad Request response for missing query parameter username")), }; @@ -3656,6 +3868,7 @@ where Ok(param_password) => Some(param_password), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse query parameter password - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid query parameter password")), } @@ -3666,6 +3879,7 @@ where Some(param_password) => param_password, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Missing required query parameter password")) .expect("Unable to create Bad Request response for missing query parameter password")), }; @@ -3698,6 +3912,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling x_rate_limit header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -3715,6 +3930,7 @@ where Err(e) => { return Ok(Response::builder() .status(StatusCode::INTERNAL_SERVER_ERROR) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("An internal server error occurred handling x_expires_after header - {e}"))) .expect("Unable to create Internal Server Error for invalid response header")) } @@ -3755,6 +3971,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3800,6 +4020,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3838,11 +4062,13 @@ where Ok(param_username) => param_username, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter username: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["username"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3874,6 +4100,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -3912,11 +4142,13 @@ where Ok(param_username) => param_username, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter username: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["username"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -3972,6 +4204,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -4010,11 +4246,13 @@ where Ok(param_username) => param_username, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't parse path parameter username: {e}"))) .expect("Unable to create Bad Request response for invalid path parameter")), }, Err(_) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["username"]))) .expect("Unable to create Bad Request response for invalid percent decode")) }; @@ -4035,6 +4273,7 @@ where Ok(param_body) => param_body, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to schema")), } @@ -4046,6 +4285,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -4086,6 +4326,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -4094,6 +4338,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs index 701c40d5f073..4ac45199b594 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/src/server/mod.rs @@ -257,6 +257,7 @@ where Some(ref authorization) => authorization, None => return Ok(Response::builder() .status(StatusCode::FORBIDDEN) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_str("Unauthenticated")) .expect("Unable to create Authentication Forbidden response")), }; @@ -283,6 +284,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs index 4358057a44aa..a5ebf44bcd84 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs @@ -349,6 +349,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -393,6 +397,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -432,6 +440,7 @@ where Ok(param_nested_response) => param_nested_response, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter nested_response - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter nested_response due to schema")), } @@ -443,6 +452,7 @@ where Some(param_nested_response) => param_nested_response, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter nested_response".to_string())) .expect("Unable to create Bad Request response for missing body parameter nested_response")), }; @@ -477,6 +487,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -485,6 +499,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -534,6 +549,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -584,6 +603,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -618,6 +641,7 @@ where Ok(param_body) => Some(param_body), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter body - not valid UTF-8: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter body due to UTF-8")), } @@ -628,6 +652,7 @@ where Some(param_body) => param_body, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter body".to_string())) .expect("Unable to create Bad Request response for missing body parameter body")), }; @@ -660,6 +685,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -668,6 +697,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -700,6 +730,7 @@ where Ok(param_value) => Some(param_value), Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter value - not valid UTF-8: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter value due to UTF-8")), } @@ -710,6 +741,7 @@ where Some(param_value) => param_value, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter value".to_string())) .expect("Unable to create Bad Request response for missing body parameter value")), }; @@ -736,6 +768,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -744,6 +780,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } @@ -793,6 +830,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -832,6 +873,7 @@ where Ok(param_value) => param_value, Err(e) => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new(format!("Couldn't parse body parameter value - doesn't match schema: {e}"))) .expect("Unable to create Bad Request response for invalid body parameter value due to schema")), } @@ -843,6 +885,7 @@ where Some(param_value) => param_value, None => return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(BoxBody::new("Missing required body parameter value".to_string())) .expect("Unable to create Bad Request response for missing body parameter value")), }; @@ -875,6 +918,10 @@ where // Application code returned an error. This should not happen, as the implementation should // return a valid response. *response.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + response.headers_mut().insert( + CONTENT_TYPE, + HeaderValue::from_static("text/plain"), + ); *response.body_mut() = body_from_str("An internal error occurred"); }, } @@ -883,6 +930,7 @@ where }, Err(e) => Ok(Response::builder() .status(StatusCode::BAD_REQUEST) + .header(CONTENT_TYPE, mime::TEXT_PLAIN.as_ref()) .body(body_from_string(format!("Unable to read body: {}", e.into()))) .expect("Unable to create Bad Request response due to unable to read body")), } diff --git a/website/src/dynamic/sponsors.yml b/website/src/dynamic/sponsors.yml index 7b353f91e4b2..f04d15c8694b 100755 --- a/website/src/dynamic/sponsors.yml +++ b/website/src/dynamic/sponsors.yml @@ -188,3 +188,8 @@ image: "img/companies/instantfamous.png" infoLink: "https://www.instant-famous.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship" bronze: true +- + caption: "BetterFollowers" + image: "img/companies/betterfollowers.png" + infoLink: "https://betterfollowers.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship" + bronze: true diff --git a/website/static/img/companies/betterfollowers.png b/website/static/img/companies/betterfollowers.png new file mode 100644 index 000000000000..71526412780c Binary files /dev/null and b/website/static/img/companies/betterfollowers.png differ