mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-08 08:30:56 +00:00
[abstract-csharp] Process all operation parameter collections (#15841)
* added new vendor extenion * moved code to methods to enable overriding * fixed tests * renamed method to setTypeMapping * removed commented code * moved code to make diff easier to understand * removed commented code * process all operation parameter collections * fixed bugs * fixed bugs
This commit is contained in:
parent
bdeb4ff5a4
commit
882b9a8c50
@ -50,6 +50,7 @@ public class CodegenOperation {
|
||||
public List<CodegenParameter> requiredParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> optionalParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> requiredAndNotNullableParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> notNullableParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenSecurity> authMethods;
|
||||
public List<Tag> tags;
|
||||
public List<CodegenResponse> responses = new ArrayList<CodegenResponse>();
|
||||
@ -163,6 +164,10 @@ public class CodegenOperation {
|
||||
return nonEmpty(requiredAndNotNullableParams);
|
||||
}
|
||||
|
||||
public boolean getHasNotNullableParams() {
|
||||
return nonEmpty(notNullableParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there's at least one required parameter
|
||||
*
|
||||
@ -372,6 +377,7 @@ public class CodegenOperation {
|
||||
sb.append(", requiredParams=").append(requiredParams);
|
||||
sb.append(", optionalParams=").append(optionalParams);
|
||||
sb.append(", requiredAndNotNullableParams=").append(requiredAndNotNullableParams);
|
||||
sb.append(", notNullableParams=").append(notNullableParams);
|
||||
sb.append(", authMethods=").append(authMethods);
|
||||
sb.append(", tags=").append(tags);
|
||||
sb.append(", responses=").append(responses);
|
||||
@ -452,6 +458,7 @@ public class CodegenOperation {
|
||||
Objects.equals(requiredParams, that.requiredParams) &&
|
||||
Objects.equals(optionalParams, that.optionalParams) &&
|
||||
Objects.equals(requiredAndNotNullableParams, that.requiredAndNotNullableParams) &&
|
||||
Objects.equals(notNullableParams, that.notNullableParams) &&
|
||||
Objects.equals(authMethods, that.authMethods) &&
|
||||
Objects.equals(tags, that.tags) &&
|
||||
Objects.equals(responses, that.responses) &&
|
||||
@ -481,6 +488,6 @@ public class CodegenOperation {
|
||||
pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams,
|
||||
authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs,
|
||||
vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase,
|
||||
operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams);
|
||||
operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams, notNullableParams);
|
||||
}
|
||||
}
|
||||
|
@ -4506,6 +4506,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
List<CodegenParameter> requiredParams = new ArrayList<>();
|
||||
List<CodegenParameter> optionalParams = new ArrayList<>();
|
||||
List<CodegenParameter> requiredAndNotNullableParams = new ArrayList<>();
|
||||
List<CodegenParameter> notNullableParams = new ArrayList<>();
|
||||
|
||||
CodegenParameter bodyParam = null;
|
||||
RequestBody requestBody = operation.getRequestBody();
|
||||
@ -4619,6 +4620,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (cp.requiredAndNotNullable()) {
|
||||
requiredAndNotNullableParams.add(cp.copy());
|
||||
}
|
||||
|
||||
if (!cp.isNullable) {
|
||||
notNullableParams.add(cp.copy());
|
||||
}
|
||||
}
|
||||
|
||||
// add imports to operation import tag
|
||||
@ -4656,6 +4661,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
op.requiredParams = requiredParams;
|
||||
op.optionalParams = optionalParams;
|
||||
op.requiredAndNotNullableParams = requiredAndNotNullableParams;
|
||||
op.notNullableParams = notNullableParams;
|
||||
op.externalDocs = operation.getExternalDocs();
|
||||
// legacy support
|
||||
op.nickname = op.operationId;
|
||||
|
@ -725,82 +725,50 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
CodegenModel codegenModel = modelHashMap.getModel();
|
||||
|
||||
for (CodegenParameter parameter : operation.allParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.bodyParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.cookieParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.formParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.headerParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.implicitHeadersParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.optionalParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.pathParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.queryParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.requiredAndNotNullableParams) {
|
||||
patchParameter(parameter);
|
||||
for (CodegenParameter parameter : operation.notNullableParams) {
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
|
||||
for (CodegenParameter parameter : operation.requiredParams) {
|
||||
patchParameter(parameter);
|
||||
patchParameter(parameter, allModels);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move this into patchParamter
|
||||
if (!isSupportNullable()) {
|
||||
for (CodegenParameter parameter : operation.allParams) {
|
||||
CodegenModel model = null;
|
||||
for (ModelMap modelHashMap : allModels) {
|
||||
CodegenModel codegenModel = modelHashMap.getModel();
|
||||
if (codegenModel.getClassname().equals(parameter.dataType)) {
|
||||
model = codegenModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (model == null) {
|
||||
// Primitive data types all come already marked
|
||||
parameter.isNullable = true;
|
||||
} else {
|
||||
// Effectively mark enum models as enums and non-nullable
|
||||
if (model.isEnum) {
|
||||
parameter.isEnum = true;
|
||||
parameter.allowableValues = model.allowableValues;
|
||||
parameter.isPrimitiveType = true;
|
||||
parameter.isNullable = false;
|
||||
} else {
|
||||
parameter.isNullable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Effectively mark enum models as enums
|
||||
updateCodegenParametersEnum(operation.allParams, allModels);
|
||||
}
|
||||
|
||||
processOperation(operation);
|
||||
}
|
||||
}
|
||||
@ -809,7 +777,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
return objs;
|
||||
}
|
||||
|
||||
private void patchParameter(CodegenParameter parameter) {
|
||||
private void patchParameter(CodegenParameter parameter, List<ModelMap> allModels) {
|
||||
parameter.paramName = escapeReservedWord(parameter.paramName);
|
||||
|
||||
if (parameter.isNullable && !parameter.isContainer && (this.getNullableTypes().contains(parameter.dataType) || parameter.isEnum)) {
|
||||
@ -819,38 +787,52 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
if (this.getNullableReferencesTypes() || (parameter.vendorExtensions.get("x-nullable-value-type") != null)) {
|
||||
parameter.vendorExtensions.put("x-nullable-type", true);
|
||||
}
|
||||
|
||||
|
||||
CodegenModel model = null;
|
||||
for (ModelMap modelHashMap : allModels) {
|
||||
CodegenModel codegenModel = modelHashMap.getModel();
|
||||
if (codegenModel.getClassname().equals(parameter.dataType)) {
|
||||
model = codegenModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSupportNullable()) {
|
||||
if (model == null) {
|
||||
parameter.isNullable = true;
|
||||
} else {
|
||||
if (model.isEnum) {
|
||||
parameter.isEnum = true;
|
||||
parameter.allowableValues = model.allowableValues;
|
||||
parameter.isPrimitiveType = true;
|
||||
parameter.isNullable = false;
|
||||
} else {
|
||||
parameter.isNullable = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
updateCodegenParameterEnum(parameter, model);
|
||||
}
|
||||
}
|
||||
|
||||
protected void processOperation(CodegenOperation operation) {
|
||||
// default noop
|
||||
}
|
||||
|
||||
// TODO: move this into patchParamter
|
||||
protected void updateCodegenParametersEnum(List<CodegenParameter> parameters, List<ModelMap> allModels) {
|
||||
for (CodegenParameter parameter : parameters) {
|
||||
CodegenModel model = null;
|
||||
for (ModelMap modelHashMap : allModels) {
|
||||
CodegenModel codegenModel = modelHashMap.getModel();
|
||||
if (codegenModel.getClassname().equals(parameter.dataType)) {
|
||||
model = codegenModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (model != null) {
|
||||
// Effectively mark enum models as enums and non-nullable
|
||||
if (model.isEnum) {
|
||||
parameter.isEnum = true;
|
||||
parameter.allowableValues = model.allowableValues;
|
||||
parameter.isPrimitiveType = true;
|
||||
parameter.vendorExtensions.put("x-csharp-value-type", true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!parameter.isContainer && this.getNullableTypes().contains(parameter.dataType)) {
|
||||
protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) {
|
||||
if (model != null) {
|
||||
if (model.isEnum) {
|
||||
parameter.isEnum = true;
|
||||
parameter.allowableValues = model.allowableValues;
|
||||
parameter.isPrimitiveType = true;
|
||||
parameter.vendorExtensions.put("x-csharp-value-type", true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!parameter.isContainer && this.getNullableTypes().contains(parameter.dataType)) {
|
||||
parameter.vendorExtensions.put("x-csharp-value-type", true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -337,13 +337,11 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateCodegenParametersEnum(List<CodegenParameter> parameters, List<ModelMap> allModels) {
|
||||
super.updateCodegenParametersEnum(parameters, allModels);
|
||||
protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) {
|
||||
super.updateCodegenParameterEnum(parameter, model);
|
||||
|
||||
for (CodegenParameter parameter : parameters) {
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -385,13 +385,11 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateCodegenParametersEnum(List<CodegenParameter> parameters, List<ModelMap> allModels) {
|
||||
super.updateCodegenParametersEnum(parameters, allModels);
|
||||
protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) {
|
||||
super.updateCodegenParameterEnum(parameter, model);
|
||||
|
||||
for (CodegenParameter parameter : parameters) {
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
}
|
||||
|
||||
@ -932,7 +930,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
Collections.sort(op.cookieParams, parameterComparatorByDataType);
|
||||
Collections.sort(op.requiredParams, parameterComparatorByDataType);
|
||||
Collections.sort(op.optionalParams, parameterComparatorByDataType);
|
||||
Collections.sort(op.requiredAndNotNullableParams, parameterComparatorByDataType);
|
||||
Collections.sort(op.notNullableParams, parameterComparatorByDataType);
|
||||
|
||||
Comparator<CodegenParameter> comparator = parameterComparatorByRequired.thenComparing(parameterComparatorByDefaultValue);
|
||||
Collections.sort(op.allParams, comparator);
|
||||
@ -945,7 +943,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
Collections.sort(op.cookieParams, comparator);
|
||||
Collections.sort(op.requiredParams, comparator);
|
||||
Collections.sort(op.optionalParams, comparator);
|
||||
Collections.sort(op.requiredAndNotNullableParams, comparator);
|
||||
Collections.sort(op.notNullableParams, comparator);
|
||||
|
||||
return op;
|
||||
}
|
||||
|
@ -287,13 +287,11 @@ public class CSharpFunctionsServerCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateCodegenParametersEnum(List<CodegenParameter> parameters, List<ModelMap> allModels) {
|
||||
super.updateCodegenParametersEnum(parameters, allModels);
|
||||
protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) {
|
||||
super.updateCodegenParameterEnum(parameter, model);
|
||||
|
||||
for (CodegenParameter parameter : parameters) {
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,13 +345,11 @@ public class CSharpReducedClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateCodegenParametersEnum(List<CodegenParameter> parameters, List<ModelMap> allModels) {
|
||||
super.updateCodegenParametersEnum(parameters, allModels);
|
||||
protected void updateCodegenParameterEnum(CodegenParameter parameter, CodegenModel model) {
|
||||
super.updateCodegenParameterEnum(parameter, model);
|
||||
|
||||
for (CodegenParameter parameter : parameters) {
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
if (!parameter.required && parameter.vendorExtensions.get("x-csharp-value-type") != null) { //optional
|
||||
parameter.dataType = parameter.dataType + "?";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
{{/-first}}
|
||||
{{/allParams}}
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#notNullableParams}}
|
||||
{{#-first}}
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
@ -141,9 +141,9 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// <param name="{{paramName}}"></param>
|
||||
{{#-last}}
|
||||
/// <returns></returns>
|
||||
private void Validate{{operationId}}({{#requiredAndNotNullableParams}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}})
|
||||
private void Validate{{operationId}}({{#notNullableParams}}{{#required}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{/required}}{{^required}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/required}} {{paramName}}{{^-last}}, {{/-last}}{{/notNullableParams}})
|
||||
{
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#notNullableParams}}
|
||||
{{#-first}}
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -155,21 +155,25 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
{{/nrt}}
|
||||
{{^nrt}}
|
||||
{{^vendorExtensions.x-csharp-value-type}}
|
||||
{{^vendorExtensions.x-is-value-type}}
|
||||
if ({{paramName}} == null)
|
||||
throw new ArgumentNullException(nameof({{paramName}}));
|
||||
|
||||
{{/vendorExtensions.x-csharp-value-type}}
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
{{#vendorExtensions.x-is-value-type}}
|
||||
if ({{paramName}} == null)
|
||||
throw new ArgumentNullException(nameof({{paramName}}));
|
||||
{{/vendorExtensions.x-is-value-type}}
|
||||
{{/nrt}}
|
||||
{{#-last}}
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
{{/-last}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
{{/notNullableParams}}
|
||||
}
|
||||
|
||||
{{/-last}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
{{/notNullableParams}}
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -254,12 +258,12 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
|
||||
try
|
||||
{
|
||||
{{#requiredAndNotNullableParams}}
|
||||
{{#notNullableParams}}
|
||||
{{#-first}}
|
||||
Validate{{operationId}}({{#requiredAndNotNullableParams}}{{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullableParams}});
|
||||
Validate{{operationId}}({{#notNullableParams}}{{paramName}}{{^-last}}, {{/-last}}{{/notNullableParams}});
|
||||
|
||||
{{/-first}}
|
||||
{{/requiredAndNotNullableParams}}
|
||||
{{/notNullableParams}}
|
||||
{{#allParams}}
|
||||
{{#-first}}
|
||||
Format{{operationId}}({{#allParams}}{{#isPrimitiveType}}ref {{/isPrimitiveType}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
|
@ -508,7 +508,7 @@ namespace Org.OpenAPITools.Api
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.Serialize(status)); // form parameter
|
||||
localVarRequestOptions.FormParameters.Add("status", Org.OpenAPITools.Client.ClientUtils.ParameterToString(status)); // form parameter
|
||||
if (marker != null)
|
||||
{
|
||||
localVarRequestOptions.FormParameters.Add("marker", Org.OpenAPITools.Client.ClientUtils.ParameterToString(marker)); // form parameter
|
||||
|
@ -609,6 +609,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterBooleanSerialize(ref bool? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterBooleanSerialize(bool? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -680,6 +697,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterBooleanSerialize(body);
|
||||
|
||||
FormatFakeOuterBooleanSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -738,6 +757,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterCompositeSerialize(OuterComposite? outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="outerComposite"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterCompositeSerialize(OuterComposite? outerComposite)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (outerComposite == null)
|
||||
throw new ArgumentNullException(nameof(outerComposite));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -809,6 +845,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
FormatFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -867,6 +905,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterNumberSerialize(ref decimal? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterNumberSerialize(decimal? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -938,6 +993,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterNumberSerialize(body);
|
||||
|
||||
FormatFakeOuterNumberSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -1000,8 +1057,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid, string? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1009,6 +1067,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredStringUuid == null)
|
||||
throw new ArgumentNullException(nameof(requiredStringUuid));
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1090,7 +1151,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid);
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid, body);
|
||||
|
||||
FormatFakeOuterStringSerialize(ref requiredStringUuid, ref body);
|
||||
|
||||
@ -1711,8 +1772,18 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="number"></param>
|
||||
/// <param name="varDouble"></param>
|
||||
/// <param name="patternWithoutDelimiter"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <param name="binary"></param>
|
||||
/// <param name="varFloat"></param>
|
||||
/// <param name="integer"></param>
|
||||
/// <param name="int32"></param>
|
||||
/// <param name="int64"></param>
|
||||
/// <param name="varString"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? varFloat, int? integer, int? int32, long? int64, string? varString, string? password, string? callback, DateTime? dateTime)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1729,6 +1800,36 @@ namespace Org.OpenAPITools.Api
|
||||
if (patternWithoutDelimiter == null)
|
||||
throw new ArgumentNullException(nameof(patternWithoutDelimiter));
|
||||
|
||||
if (date == null)
|
||||
throw new ArgumentNullException(nameof(date));
|
||||
|
||||
if (binary == null)
|
||||
throw new ArgumentNullException(nameof(binary));
|
||||
|
||||
if (varFloat == null)
|
||||
throw new ArgumentNullException(nameof(varFloat));
|
||||
|
||||
if (integer == null)
|
||||
throw new ArgumentNullException(nameof(integer));
|
||||
|
||||
if (int32 == null)
|
||||
throw new ArgumentNullException(nameof(int32));
|
||||
|
||||
if (int64 == null)
|
||||
throw new ArgumentNullException(nameof(int64));
|
||||
|
||||
if (varString == null)
|
||||
throw new ArgumentNullException(nameof(varString));
|
||||
|
||||
if (password == null)
|
||||
throw new ArgumentNullException(nameof(password));
|
||||
|
||||
if (callback == null)
|
||||
throw new ArgumentNullException(nameof(callback));
|
||||
|
||||
if (dateTime == null)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1882,7 +1983,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter);
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
|
||||
FormatTestEndpointParameters(ref varByte, ref number, ref varDouble, ref patternWithoutDelimiter, ref date, ref binary, ref varFloat, ref integer, ref int32, ref int64, ref varString, ref password, ref callback, ref dateTime);
|
||||
|
||||
@ -1987,6 +2088,51 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatTestEnumParameters(List<string>? enumHeaderStringArray, List<string>? enumQueryStringArray, ref double? enumQueryDouble, ref int? enumQueryInteger, List<string>? enumFormStringArray, ref string? enumHeaderString, ref string? enumQueryString, ref string? enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="enumHeaderStringArray"></param>
|
||||
/// <param name="enumQueryStringArray"></param>
|
||||
/// <param name="enumQueryDouble"></param>
|
||||
/// <param name="enumQueryInteger"></param>
|
||||
/// <param name="enumFormStringArray"></param>
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEnumParameters(List<string>? enumHeaderStringArray, List<string>? enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List<string>? enumFormStringArray, string? enumHeaderString, string? enumQueryString, string? enumFormString)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (enumHeaderStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderStringArray));
|
||||
|
||||
if (enumQueryStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryStringArray));
|
||||
|
||||
if (enumQueryDouble == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryDouble));
|
||||
|
||||
if (enumQueryInteger == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryInteger));
|
||||
|
||||
if (enumFormStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumFormStringArray));
|
||||
|
||||
if (enumHeaderString == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderString));
|
||||
|
||||
if (enumQueryString == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryString));
|
||||
|
||||
if (enumFormString == null)
|
||||
throw new ArgumentNullException(nameof(enumFormString));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -2100,6 +2246,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
|
||||
FormatTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, ref enumQueryDouble, ref enumQueryInteger, enumFormStringArray, ref enumHeaderString, ref enumQueryString, ref enumFormString);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -2185,8 +2333,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredBooleanGroup"></param>
|
||||
/// <param name="requiredStringGroup"></param>
|
||||
/// <param name="requiredInt64Group"></param>
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -2200,6 +2351,15 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredInt64Group == null)
|
||||
throw new ArgumentNullException(nameof(requiredInt64Group));
|
||||
|
||||
if (booleanGroup == null)
|
||||
throw new ArgumentNullException(nameof(booleanGroup));
|
||||
|
||||
if (stringGroup == null)
|
||||
throw new ArgumentNullException(nameof(stringGroup));
|
||||
|
||||
if (int64Group == null)
|
||||
throw new ArgumentNullException(nameof(int64Group));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -2305,7 +2465,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group);
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
|
||||
FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredStringGroup, ref requiredInt64Group, ref booleanGroup, ref stringGroup, ref int64Group);
|
||||
|
||||
|
@ -487,8 +487,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeletePet(long petId)
|
||||
private void ValidateDeletePet(long petId, string? apiKey)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -496,6 +497,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (apiKey == null)
|
||||
throw new ArgumentNullException(nameof(apiKey));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -577,7 +581,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeletePet(petId);
|
||||
ValidateDeletePet(petId, apiKey);
|
||||
|
||||
FormatDeletePet(ref petId, ref apiKey);
|
||||
|
||||
@ -1280,8 +1284,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePetWithForm(long petId)
|
||||
private void ValidateUpdatePetWithForm(long petId, string? name, string? status)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1289,6 +1295,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (name == null)
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
|
||||
if (status == null)
|
||||
throw new ArgumentNullException(nameof(status));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1376,7 +1388,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdatePetWithForm(petId);
|
||||
ValidateUpdatePetWithForm(petId, name, status);
|
||||
|
||||
FormatUpdatePetWithForm(ref petId, ref name, ref status);
|
||||
|
||||
@ -1452,8 +1464,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFile(long petId)
|
||||
private void ValidateUploadFile(long petId, System.IO.Stream? file, string? additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1461,6 +1475,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (file == null)
|
||||
throw new ArgumentNullException(nameof(file));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1548,7 +1568,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFile(petId);
|
||||
ValidateUploadFile(petId, file, additionalMetadata);
|
||||
|
||||
FormatUploadFile(ref petId, ref file, ref additionalMetadata);
|
||||
|
||||
@ -1634,8 +1654,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId)
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string? additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1646,6 +1667,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1733,7 +1757,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId);
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
|
||||
|
||||
FormatUploadFileWithRequiredFile(ref requiredFile, ref petId, ref additionalMetadata);
|
||||
|
||||
|
@ -607,6 +607,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterBooleanSerialize(ref bool? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterBooleanSerialize(bool? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -678,6 +695,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterBooleanSerialize(body);
|
||||
|
||||
FormatFakeOuterBooleanSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -736,6 +755,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterCompositeSerialize(OuterComposite outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="outerComposite"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterCompositeSerialize(OuterComposite outerComposite)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (outerComposite == null)
|
||||
throw new ArgumentNullException(nameof(outerComposite));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -807,6 +843,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
FormatFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -865,6 +903,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterNumberSerialize(ref decimal? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterNumberSerialize(decimal? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -936,6 +991,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterNumberSerialize(body);
|
||||
|
||||
FormatFakeOuterNumberSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -998,8 +1055,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid, string body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1007,6 +1065,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredStringUuid == null)
|
||||
throw new ArgumentNullException(nameof(requiredStringUuid));
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1088,7 +1149,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid);
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid, body);
|
||||
|
||||
FormatFakeOuterStringSerialize(ref requiredStringUuid, ref body);
|
||||
|
||||
@ -1709,8 +1770,18 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="number"></param>
|
||||
/// <param name="varDouble"></param>
|
||||
/// <param name="patternWithoutDelimiter"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <param name="binary"></param>
|
||||
/// <param name="varFloat"></param>
|
||||
/// <param name="integer"></param>
|
||||
/// <param name="int32"></param>
|
||||
/// <param name="int64"></param>
|
||||
/// <param name="varString"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? varFloat, int? integer, int? int32, long? int64, string varString, string password, string callback, DateTime? dateTime)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1727,6 +1798,36 @@ namespace Org.OpenAPITools.Api
|
||||
if (patternWithoutDelimiter == null)
|
||||
throw new ArgumentNullException(nameof(patternWithoutDelimiter));
|
||||
|
||||
if (date == null)
|
||||
throw new ArgumentNullException(nameof(date));
|
||||
|
||||
if (binary == null)
|
||||
throw new ArgumentNullException(nameof(binary));
|
||||
|
||||
if (varFloat == null)
|
||||
throw new ArgumentNullException(nameof(varFloat));
|
||||
|
||||
if (integer == null)
|
||||
throw new ArgumentNullException(nameof(integer));
|
||||
|
||||
if (int32 == null)
|
||||
throw new ArgumentNullException(nameof(int32));
|
||||
|
||||
if (int64 == null)
|
||||
throw new ArgumentNullException(nameof(int64));
|
||||
|
||||
if (varString == null)
|
||||
throw new ArgumentNullException(nameof(varString));
|
||||
|
||||
if (password == null)
|
||||
throw new ArgumentNullException(nameof(password));
|
||||
|
||||
if (callback == null)
|
||||
throw new ArgumentNullException(nameof(callback));
|
||||
|
||||
if (dateTime == null)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1880,7 +1981,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter);
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
|
||||
FormatTestEndpointParameters(ref varByte, ref number, ref varDouble, ref patternWithoutDelimiter, ref date, ref binary, ref varFloat, ref integer, ref int32, ref int64, ref varString, ref password, ref callback, ref dateTime);
|
||||
|
||||
@ -1985,6 +2086,51 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatTestEnumParameters(List<string> enumHeaderStringArray, List<string> enumQueryStringArray, ref double? enumQueryDouble, ref int? enumQueryInteger, List<string> enumFormStringArray, ref string enumHeaderString, ref string enumQueryString, ref string enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="enumHeaderStringArray"></param>
|
||||
/// <param name="enumQueryStringArray"></param>
|
||||
/// <param name="enumQueryDouble"></param>
|
||||
/// <param name="enumQueryInteger"></param>
|
||||
/// <param name="enumFormStringArray"></param>
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEnumParameters(List<string> enumHeaderStringArray, List<string> enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List<string> enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (enumHeaderStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderStringArray));
|
||||
|
||||
if (enumQueryStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryStringArray));
|
||||
|
||||
if (enumQueryDouble == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryDouble));
|
||||
|
||||
if (enumQueryInteger == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryInteger));
|
||||
|
||||
if (enumFormStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumFormStringArray));
|
||||
|
||||
if (enumHeaderString == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderString));
|
||||
|
||||
if (enumQueryString == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryString));
|
||||
|
||||
if (enumFormString == null)
|
||||
throw new ArgumentNullException(nameof(enumFormString));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -2098,6 +2244,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
|
||||
FormatTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, ref enumQueryDouble, ref enumQueryInteger, enumFormStringArray, ref enumHeaderString, ref enumQueryString, ref enumFormString);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -2183,8 +2331,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredBooleanGroup"></param>
|
||||
/// <param name="requiredStringGroup"></param>
|
||||
/// <param name="requiredInt64Group"></param>
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -2198,6 +2349,15 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredInt64Group == null)
|
||||
throw new ArgumentNullException(nameof(requiredInt64Group));
|
||||
|
||||
if (booleanGroup == null)
|
||||
throw new ArgumentNullException(nameof(booleanGroup));
|
||||
|
||||
if (stringGroup == null)
|
||||
throw new ArgumentNullException(nameof(stringGroup));
|
||||
|
||||
if (int64Group == null)
|
||||
throw new ArgumentNullException(nameof(int64Group));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -2303,7 +2463,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group);
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
|
||||
FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredStringGroup, ref requiredInt64Group, ref booleanGroup, ref stringGroup, ref int64Group);
|
||||
|
||||
|
@ -485,8 +485,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeletePet(long petId)
|
||||
private void ValidateDeletePet(long petId, string apiKey)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -494,6 +495,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (apiKey == null)
|
||||
throw new ArgumentNullException(nameof(apiKey));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -575,7 +579,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeletePet(petId);
|
||||
ValidateDeletePet(petId, apiKey);
|
||||
|
||||
FormatDeletePet(ref petId, ref apiKey);
|
||||
|
||||
@ -1278,8 +1282,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePetWithForm(long petId)
|
||||
private void ValidateUpdatePetWithForm(long petId, string name, string status)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1287,6 +1293,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (name == null)
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
|
||||
if (status == null)
|
||||
throw new ArgumentNullException(nameof(status));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1374,7 +1386,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdatePetWithForm(petId);
|
||||
ValidateUpdatePetWithForm(petId, name, status);
|
||||
|
||||
FormatUpdatePetWithForm(ref petId, ref name, ref status);
|
||||
|
||||
@ -1450,8 +1462,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFile(long petId)
|
||||
private void ValidateUploadFile(long petId, System.IO.Stream file, string additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1459,6 +1473,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (file == null)
|
||||
throw new ArgumentNullException(nameof(file));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1546,7 +1566,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFile(petId);
|
||||
ValidateUploadFile(petId, file, additionalMetadata);
|
||||
|
||||
FormatUploadFile(ref petId, ref file, ref additionalMetadata);
|
||||
|
||||
@ -1632,8 +1652,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId)
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1644,6 +1665,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1731,7 +1755,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId);
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
|
||||
|
||||
FormatUploadFileWithRequiredFile(ref requiredFile, ref petId, ref additionalMetadata);
|
||||
|
||||
|
@ -606,6 +606,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterBooleanSerialize(ref bool? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterBooleanSerialize(bool? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -677,6 +694,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterBooleanSerialize(body);
|
||||
|
||||
FormatFakeOuterBooleanSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -734,6 +753,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterCompositeSerialize(OuterComposite outerComposite);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="outerComposite"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterCompositeSerialize(OuterComposite outerComposite)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (outerComposite == null)
|
||||
throw new ArgumentNullException(nameof(outerComposite));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -805,6 +841,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
FormatFakeOuterCompositeSerialize(outerComposite);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -862,6 +900,23 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatFakeOuterNumberSerialize(ref decimal? body);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterNumberSerialize(decimal? body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -933,6 +988,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterNumberSerialize(body);
|
||||
|
||||
FormatFakeOuterNumberSerialize(ref body);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -994,8 +1051,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requiredStringUuid"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid)
|
||||
private void ValidateFakeOuterStringSerialize(Guid requiredStringUuid, string body)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1003,6 +1061,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredStringUuid == null)
|
||||
throw new ArgumentNullException(nameof(requiredStringUuid));
|
||||
|
||||
if (body == null)
|
||||
throw new ArgumentNullException(nameof(body));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1084,7 +1145,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid);
|
||||
ValidateFakeOuterStringSerialize(requiredStringUuid, body);
|
||||
|
||||
FormatFakeOuterStringSerialize(ref requiredStringUuid, ref body);
|
||||
|
||||
@ -1702,8 +1763,18 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="number"></param>
|
||||
/// <param name="varDouble"></param>
|
||||
/// <param name="patternWithoutDelimiter"></param>
|
||||
/// <param name="date"></param>
|
||||
/// <param name="binary"></param>
|
||||
/// <param name="varFloat"></param>
|
||||
/// <param name="integer"></param>
|
||||
/// <param name="int32"></param>
|
||||
/// <param name="int64"></param>
|
||||
/// <param name="varString"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="callback"></param>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter)
|
||||
private void ValidateTestEndpointParameters(byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? varFloat, int? integer, int? int32, long? int64, string varString, string password, string callback, DateTime? dateTime)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1720,6 +1791,36 @@ namespace Org.OpenAPITools.Api
|
||||
if (patternWithoutDelimiter == null)
|
||||
throw new ArgumentNullException(nameof(patternWithoutDelimiter));
|
||||
|
||||
if (date == null)
|
||||
throw new ArgumentNullException(nameof(date));
|
||||
|
||||
if (binary == null)
|
||||
throw new ArgumentNullException(nameof(binary));
|
||||
|
||||
if (varFloat == null)
|
||||
throw new ArgumentNullException(nameof(varFloat));
|
||||
|
||||
if (integer == null)
|
||||
throw new ArgumentNullException(nameof(integer));
|
||||
|
||||
if (int32 == null)
|
||||
throw new ArgumentNullException(nameof(int32));
|
||||
|
||||
if (int64 == null)
|
||||
throw new ArgumentNullException(nameof(int64));
|
||||
|
||||
if (varString == null)
|
||||
throw new ArgumentNullException(nameof(varString));
|
||||
|
||||
if (password == null)
|
||||
throw new ArgumentNullException(nameof(password));
|
||||
|
||||
if (callback == null)
|
||||
throw new ArgumentNullException(nameof(callback));
|
||||
|
||||
if (dateTime == null)
|
||||
throw new ArgumentNullException(nameof(dateTime));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1873,7 +1974,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter);
|
||||
ValidateTestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
|
||||
|
||||
FormatTestEndpointParameters(ref varByte, ref number, ref varDouble, ref patternWithoutDelimiter, ref date, ref binary, ref varFloat, ref integer, ref int32, ref int64, ref varString, ref password, ref callback, ref dateTime);
|
||||
|
||||
@ -1978,6 +2079,51 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
partial void FormatTestEnumParameters(List<string> enumHeaderStringArray, List<string> enumQueryStringArray, ref double? enumQueryDouble, ref int? enumQueryInteger, List<string> enumFormStringArray, ref string enumHeaderString, ref string enumQueryString, ref string enumFormString);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="enumHeaderStringArray"></param>
|
||||
/// <param name="enumQueryStringArray"></param>
|
||||
/// <param name="enumQueryDouble"></param>
|
||||
/// <param name="enumQueryInteger"></param>
|
||||
/// <param name="enumFormStringArray"></param>
|
||||
/// <param name="enumHeaderString"></param>
|
||||
/// <param name="enumQueryString"></param>
|
||||
/// <param name="enumFormString"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestEnumParameters(List<string> enumHeaderStringArray, List<string> enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List<string> enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
|
||||
if (enumHeaderStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderStringArray));
|
||||
|
||||
if (enumQueryStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryStringArray));
|
||||
|
||||
if (enumQueryDouble == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryDouble));
|
||||
|
||||
if (enumQueryInteger == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryInteger));
|
||||
|
||||
if (enumFormStringArray == null)
|
||||
throw new ArgumentNullException(nameof(enumFormStringArray));
|
||||
|
||||
if (enumHeaderString == null)
|
||||
throw new ArgumentNullException(nameof(enumHeaderString));
|
||||
|
||||
if (enumQueryString == null)
|
||||
throw new ArgumentNullException(nameof(enumQueryString));
|
||||
|
||||
if (enumFormString == null)
|
||||
throw new ArgumentNullException(nameof(enumFormString));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
@ -2091,6 +2237,8 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
|
||||
|
||||
FormatTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, ref enumQueryDouble, ref enumQueryInteger, enumFormStringArray, ref enumHeaderString, ref enumQueryString, ref enumFormString);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
@ -2176,8 +2324,11 @@ namespace Org.OpenAPITools.Api
|
||||
/// <param name="requiredBooleanGroup"></param>
|
||||
/// <param name="requiredStringGroup"></param>
|
||||
/// <param name="requiredInt64Group"></param>
|
||||
/// <param name="booleanGroup"></param>
|
||||
/// <param name="stringGroup"></param>
|
||||
/// <param name="int64Group"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group)
|
||||
private void ValidateTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -2191,6 +2342,15 @@ namespace Org.OpenAPITools.Api
|
||||
if (requiredInt64Group == null)
|
||||
throw new ArgumentNullException(nameof(requiredInt64Group));
|
||||
|
||||
if (booleanGroup == null)
|
||||
throw new ArgumentNullException(nameof(booleanGroup));
|
||||
|
||||
if (stringGroup == null)
|
||||
throw new ArgumentNullException(nameof(stringGroup));
|
||||
|
||||
if (int64Group == null)
|
||||
throw new ArgumentNullException(nameof(int64Group));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -2296,7 +2456,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group);
|
||||
ValidateTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
|
||||
|
||||
FormatTestGroupParameters(ref requiredBooleanGroup, ref requiredStringGroup, ref requiredInt64Group, ref booleanGroup, ref stringGroup, ref int64Group);
|
||||
|
||||
|
@ -485,8 +485,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="apiKey"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateDeletePet(long petId)
|
||||
private void ValidateDeletePet(long petId, string apiKey)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -494,6 +495,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (apiKey == null)
|
||||
throw new ArgumentNullException(nameof(apiKey));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -575,7 +579,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateDeletePet(petId);
|
||||
ValidateDeletePet(petId, apiKey);
|
||||
|
||||
FormatDeletePet(ref petId, ref apiKey);
|
||||
|
||||
@ -1274,8 +1278,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUpdatePetWithForm(long petId)
|
||||
private void ValidateUpdatePetWithForm(long petId, string name, string status)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1283,6 +1289,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (name == null)
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
|
||||
if (status == null)
|
||||
throw new ArgumentNullException(nameof(status));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1370,7 +1382,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUpdatePetWithForm(petId);
|
||||
ValidateUpdatePetWithForm(petId, name, status);
|
||||
|
||||
FormatUpdatePetWithForm(ref petId, ref name, ref status);
|
||||
|
||||
@ -1446,8 +1458,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFile(long petId)
|
||||
private void ValidateUploadFile(long petId, System.IO.Stream file, string additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1455,6 +1469,12 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (file == null)
|
||||
throw new ArgumentNullException(nameof(file));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1542,7 +1562,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFile(petId);
|
||||
ValidateUploadFile(petId, file, additionalMetadata);
|
||||
|
||||
FormatUploadFile(ref petId, ref file, ref additionalMetadata);
|
||||
|
||||
@ -1627,8 +1647,9 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <param name="requiredFile"></param>
|
||||
/// <param name="petId"></param>
|
||||
/// <param name="additionalMetadata"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId)
|
||||
private void ValidateUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string additionalMetadata)
|
||||
{
|
||||
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
@ -1639,6 +1660,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (petId == null)
|
||||
throw new ArgumentNullException(nameof(petId));
|
||||
|
||||
if (additionalMetadata == null)
|
||||
throw new ArgumentNullException(nameof(additionalMetadata));
|
||||
|
||||
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
|
||||
}
|
||||
@ -1726,7 +1750,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
try
|
||||
{
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId);
|
||||
ValidateUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
|
||||
|
||||
FormatUploadFileWithRequiredFile(ref requiredFile, ref petId, ref additionalMetadata);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user