diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 83bd5ad69664..47df8a33b828 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -75,6 +75,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co protected Set collectionTypes; protected Set mapTypes; + // true if support nullable type + protected boolean supportNullable = Boolean.FALSE; + + // nullable type + protected Set nullableType = new HashSet(); + private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCSharpCodegen.class); public AbstractCSharpCodegen() { @@ -130,19 +136,26 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co "String", "string", "bool?", + "bool", "double?", + "double", "decimal?", + "decimal", "int?", + "int", "long?", + "long", "float?", + "float", "byte[]", "ICollection", "Collection", "List", "Dictionary", "DateTime?", + "DateTime", "DateTimeOffset?", - "String", + "DataTimeOffset", "Boolean", "Double", "Int32", @@ -157,6 +170,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co instantiationTypes.put("list", "List"); instantiationTypes.put("map", "Dictionary"); + // Nullable types here assume C# 2 support is not part of base typeMapping = new HashMap(); typeMapping.put("string", "string"); @@ -176,6 +190,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co typeMapping.put("map", "Dictionary"); typeMapping.put("object", "Object"); typeMapping.put("UUID", "Guid?"); + + // nullable type + nullableType = new HashSet( + Arrays.asList("decimal", "bool", "int", "float", "long", "double", "DateTime", "Guid") + ); } public void setReturnICollection(boolean returnICollection) { @@ -209,8 +228,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.useDateTimeOffsetFlag = flag; if (flag) { typeMapping.put("DateTime", "DateTimeOffset?"); - } - else { + } else { typeMapping.put("DateTime", "DateTime?"); } } @@ -421,8 +439,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } for (Map.Entry entry : models.entrySet()) { - String swaggerName = entry.getKey(); - CodegenModel model = ModelUtils.getModelByName(swaggerName, models); + String openAPIName = entry.getKey(); + CodegenModel model = ModelUtils.getModelByName(openAPIName, models); if (model != null) { for (CodegenProperty var : model.allVars) { if (enumRefs.containsKey(var.dataType)) { @@ -483,7 +501,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } } else { - LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", swaggerName); + LOGGER.warn("Expected to retrieve model %s by name, but no model was found. Check your -Dmodels inclusions.", openAPIName); } } } @@ -573,28 +591,30 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } - for (CodegenParameter parameter: operation.allParams) { - CodegenModel model = null; - for(Object modelHashMap: allModels) { - CodegenModel codegenModel = ((HashMap) modelHashMap).get("model"); - if (codegenModel.getClassname().equals(parameter.dataType)) { - model = codegenModel; - break; + if (!isSupportNullable()) { + for (CodegenParameter parameter : operation.allParams) { + CodegenModel model = null; + for (Object modelHashMap : allModels) { + CodegenModel codegenModel = ((HashMap) modelHashMap).get("model"); + 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 { + 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; + } } } } @@ -792,6 +812,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co return reservedWords.contains(word); } + public String getNullableType(Schema p, String type) { + if (languageSpecificPrimitives.contains(type)) { + return type; + } else { + return null; + } + } + @Override public String getSchemaType(Schema p) { String openAPIType = super.getSchemaType(p); @@ -804,8 +832,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co if (typeMapping.containsKey(openAPIType)) { type = typeMapping.get(openAPIType); - if (languageSpecificPrimitives.contains(type)) { - return type; + String languageType = getNullableType(p, type); + if (languageType != null) { + return languageType; } } else { type = openAPIType; @@ -950,6 +979,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.interfacePrefix = interfacePrefix; } + public boolean isSupportNullable() { + return supportNullable; + } + + public void setSupportNullable(final boolean supportNullable) { + this.supportNullable = supportNullable; + } + @Override public String toEnumValue(String value, String datatype) { // C# only supports enums as literals for int, int?, long, long?, byte, and byte?. All else must be treated as strings. @@ -1011,7 +1048,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co @Override public boolean isDataTypeString(String dataType) { // also treat double/decimal/float as "string" in enum so that the values (e.g. 2.8) get double-quoted - return "String".equalsIgnoreCase(dataType) || "double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType); + return "String".equalsIgnoreCase(dataType) || + "double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType) || + "double".equals(dataType) || "decimal".equals(dataType) || "float".equals(dataType); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index cf074dd100a5..c671a446790b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -776,7 +776,6 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { } } - public void setPackageName(String packageName) { this.packageName = packageName; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java index 7588a366b661..4ce60b82f1d8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpRefactorClientCodegen.java @@ -22,6 +22,7 @@ import static org.apache.commons.lang3.StringUtils.isEmpty; import com.google.common.collect.ImmutableMap; import com.samskivert.mustache.Mustache; +import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CliOption; @@ -32,6 +33,7 @@ import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,19 +86,39 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen { // By default, generated code is considered public protected boolean nonPublicApi = Boolean.FALSE; + public CSharpRefactorClientCodegen() { super(); + + // mapped non-nullable type without ? + typeMapping = new HashMap(); + typeMapping.put("string", "string"); + typeMapping.put("binary", "byte[]"); + typeMapping.put("ByteArray", "byte[]"); + typeMapping.put("boolean", "bool"); + typeMapping.put("integer", "int"); + typeMapping.put("float", "float"); + typeMapping.put("long", "long"); + typeMapping.put("double", "double"); + typeMapping.put("number", "decimal"); + typeMapping.put("DateTime", "DateTime"); + typeMapping.put("date", "DateTime"); + typeMapping.put("file", "System.IO.Stream"); + typeMapping.put("array", "List"); + typeMapping.put("list", "List"); + typeMapping.put("map", "Dictionary"); + typeMapping.put("object", "Object"); + typeMapping.put("UUID", "Guid"); + + setSupportNullable(Boolean.TRUE); + hideGenerationTimestamp = Boolean.TRUE; supportsInheritance = true; modelTemplateFiles.put("model.mustache", ".cs"); apiTemplateFiles.put("api.mustache", ".cs"); - modelDocTemplateFiles.put("model_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); - embeddedTemplateDir = templateDir = "csharp-refactor"; - hideGenerationTimestamp = Boolean.TRUE; - cliOptions.clear(); // CLI options @@ -223,7 +245,6 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen { setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); } - if (isEmpty(apiPackage)) { setApiPackage("Api"); } @@ -609,6 +630,10 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen { public void postProcessParameter(CodegenParameter parameter) { postProcessPattern(parameter.pattern, parameter.vendorExtensions); super.postProcessParameter(parameter); + + if (!parameter.required && nullableType.contains(parameter.dataType)) { //optional + parameter.dataType = parameter.dataType + "?"; + } } @Override @@ -852,4 +877,17 @@ public class CSharpRefactorClientCodegen extends AbstractCSharpCodegen { // To avoid unexpected behaviors when options are passed programmatically such as { "supportsAsync": "" } return super.processCompiler(compiler).emptyStringIsFalse(true); } + + @Override + public String getNullableType(Schema p, String type) { + if (languageSpecificPrimitives.contains(type)) { + if (isSupportNullable() && ModelUtils.isNullable(p) && nullableType.contains(type)) { + return type + "?"; + } else { + return type; + } + } else { + return null; + } + } } diff --git a/modules/openapi-generator/src/main/resources/csharp-refactor/api.mustache b/modules/openapi-generator/src/main/resources/csharp-refactor/api.mustache index 5605a586f86c..812da9005362 100644 --- a/modules/openapi-generator/src/main/resources/csharp-refactor/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-refactor/api.mustache @@ -85,7 +85,7 @@ namespace {{packageName}}.{{apiPackage}} /// {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{classname}}Sync{{#supportsAsync}}, {{interfacePrefix}}{{classname}}Async{{/supportsAsync}} { - + } /// @@ -94,7 +94,7 @@ namespace {{packageName}}.{{apiPackage}} {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} { private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -151,7 +151,7 @@ namespace {{packageName}}.{{apiPackage}} if(asyncClient == null) throw new ArgumentNullException("asyncClient"); {{/supportsAsync}} if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; {{#supportsAsync}} this.AsynchronousClient = asyncClient; @@ -225,13 +225,15 @@ namespace {{packageName}}.{{apiPackage}} public {{packageName}}.Client.ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} + {{^isNullable}} {{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/required}} - {{/allParams}} + {{/required}} + {{/isNullable}} + {{/allParams}} {{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -362,11 +364,14 @@ namespace {{packageName}}.{{apiPackage}} public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>> {{operationId}}AsyncWithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}} + {{^isNullable}} {{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) throw new {{packageName}}.Client.ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); + {{/required}} + {{/isNullable}} {{/allParams}} {{packageName}}.Client.RequestOptions requestOptions = new {{packageName}}.Client.RequestOptions(); diff --git a/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache index 6b5e19c745b6..8e20992645a7 100644 --- a/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-refactor/modelGeneric.mustache @@ -58,6 +58,7 @@ {{#vars}} {{^isInherited}} {{^isReadOnly}} + {{^isNullable}} {{#required}} {{^isEnum}} // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) @@ -74,6 +75,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; {{/isEnum}} {{/required}} + {{/isNullable}} {{/isReadOnly}} {{/isInherited}} {{/vars}} diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ApiResponse.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ApiResponse.md index 01b35815bd40..1ac0bfc8acd7 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ApiResponse.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ApiResponse.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Code** | **int?** | | [optional] +**Code** | **int** | | [optional] **Type** | **string** | | [optional] **Message** | **string** | | [optional] diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md index 614546d32564..a4acb4dfa7c8 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal?>>** | | [optional] +**ArrayArrayNumber** | **List<List<decimal>>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfNumberOnly.md index 1886a6edcb46..c61636e35856 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayOfNumberOnly.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal?>** | | [optional] +**ArrayNumber** | **List<decimal>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayTest.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayTest.md index ff6a6cb24b0e..a5e9e5c244c7 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayTest.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/ArrayTest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long?>>** | | [optional] +**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] **ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Cat.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Cat.md index 4b79315204f3..8975864ba12f 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Cat.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Cat.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | **Color** | **string** | | [optional] [default to "red"] -**Declawed** | **bool?** | | [optional] +**Declawed** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Category.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Category.md index 67e28fe8d08e..f7b8d4ebf743 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Category.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Category.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long?** | | [optional] +**Id** | **long** | | [optional] **Name** | **string** | | [default to "default-name"] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/EnumTest.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/EnumTest.md index 0e1666d4feae..3251659917f2 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/EnumTest.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/EnumTest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **EnumString** | **string** | | [optional] **EnumStringRequired** | **string** | | -**EnumInteger** | **int?** | | [optional] -**EnumNumber** | **double?** | | [optional] +**EnumInteger** | **int** | | [optional] +**EnumNumber** | **double** | | [optional] **OuterEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FakeApi.md index 392061b6e45d..9ed98a04c58c 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FakeApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **FakeOuterBooleanSerialize** -> bool? FakeOuterBooleanSerialize (bool? body = null) +> bool FakeOuterBooleanSerialize (bool? body = null) @@ -45,7 +45,7 @@ namespace Example try { - bool? result = apiInstance.FakeOuterBooleanSerialize(body); + bool result = apiInstance.FakeOuterBooleanSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### Return type -**bool?** +**bool** ### Authorization @@ -140,7 +140,7 @@ No authorization required # **FakeOuterNumberSerialize** -> decimal? FakeOuterNumberSerialize (decimal? body = null) +> decimal FakeOuterNumberSerialize (decimal? body = null) @@ -165,7 +165,7 @@ namespace Example try { - decimal? result = apiInstance.FakeOuterNumberSerialize(body); + decimal result = apiInstance.FakeOuterNumberSerialize(body); Debug.WriteLine(result); } catch (Exception e) @@ -185,7 +185,7 @@ Name | Type | Description | Notes ### Return type -**decimal?** +**decimal** ### Authorization @@ -439,7 +439,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -464,8 +464,8 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var number = 8.14; // decimal? | None - var _double = 1.2D; // double? | None + var number = 8.14; // decimal | None + var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None var integer = 56; // int? | None (optional) @@ -497,8 +497,8 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **number** | **decimal?**| None | - **_double** | **double?**| None | + **number** | **decimal**| None | + **_double** | **double**| None | **patternWithoutDelimiter** | **string**| None | **_byte** | **byte[]**| None | **integer** | **int?**| None | [optional] @@ -603,7 +603,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -624,9 +624,9 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var requiredStringGroup = 56; // int? | Required String in group parameters - var requiredBooleanGroup = true; // bool? | Required Boolean in group parameters - var requiredInt64Group = 789; // long? | Required Integer in group parameters + var requiredStringGroup = 56; // int | Required String in group parameters + var requiredBooleanGroup = true; // bool | Required Boolean in group parameters + var requiredInt64Group = 789; // long | Required Integer in group parameters var stringGroup = 56; // int? | String in group parameters (optional) var booleanGroup = true; // bool? | Boolean in group parameters (optional) var int64Group = 789; // long? | Integer in group parameters (optional) @@ -649,9 +649,9 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int?**| Required String in group parameters | - **requiredBooleanGroup** | **bool?**| Required Boolean in group parameters | - **requiredInt64Group** | **long?**| Required Integer in group parameters | + **requiredStringGroup** | **int**| Required String in group parameters | + **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | + **requiredInt64Group** | **long**| Required Integer in group parameters | **stringGroup** | **int?**| String in group parameters | [optional] **booleanGroup** | **bool?**| Boolean in group parameters | [optional] **int64Group** | **long?**| Integer in group parameters | [optional] diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FormatTest.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FormatTest.md index f82c08bd75bd..909ceff242c0 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FormatTest.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/FormatTest.md @@ -3,18 +3,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Integer** | **int?** | | [optional] -**Int32** | **int?** | | [optional] -**Int64** | **long?** | | [optional] -**Number** | **decimal?** | | -**Float** | **float?** | | [optional] -**Double** | **double?** | | [optional] +**Integer** | **int** | | [optional] +**Int32** | **int** | | [optional] +**Int64** | **long** | | [optional] +**Number** | **decimal** | | +**Float** | **float** | | [optional] +**Double** | **double** | | [optional] **String** | **string** | | [optional] **Byte** | **byte[]** | | **Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime?** | | -**DateTime** | **DateTime?** | | [optional] -**Uuid** | **Guid?** | | [optional] +**Date** | **DateTime** | | +**DateTime** | **DateTime** | | [optional] +**Uuid** | [**Guid**](Guid.md) | | [optional] **Password** | **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MapTest.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MapTest.md index 2c44f95808ae..b2e30bde4c37 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MapTest.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MapTest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] **MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool?>** | | [optional] -**IndirectMap** | **Dictionary<string, bool?>** | | [optional] +**DirectMap** | **Dictionary<string, bool>** | | [optional] +**IndirectMap** | **Dictionary<string, bool>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 9b8e2e3434c1..f1d3323922eb 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **Guid?** | | [optional] -**DateTime** | **DateTime?** | | [optional] +**Uuid** | [**Guid**](Guid.md) | | [optional] +**DateTime** | **DateTime** | | [optional] **Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Model200Response.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Model200Response.md index 16337f9b6b2d..d155a4debd11 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Model200Response.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Model200Response.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **int?** | | [optional] +**Name** | **int** | | [optional] **Class** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Name.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Name.md index e22fef95673d..ca82e46fe5b8 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Name.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Name.md @@ -3,10 +3,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Name** | **int?** | | -**SnakeCase** | **int?** | | [optional] +**_Name** | **int** | | +**SnakeCase** | **int** | | [optional] **Property** | **string** | | [optional] -**_123Number** | **int?** | | [optional] +**_123Number** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/NumberOnly.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/NumberOnly.md index 5f00dedf1c39..a2ca39cc52bd 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/NumberOnly.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/NumberOnly.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustNumber** | **decimal?** | | [optional] +**JustNumber** | **decimal** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Order.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Order.md index 984bd5ca063e..13eb4a56bd5a 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Order.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Order.md @@ -3,12 +3,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long?** | | [optional] -**PetId** | **long?** | | [optional] -**Quantity** | **int?** | | [optional] -**ShipDate** | **DateTime?** | | [optional] +**Id** | **long** | | [optional] +**PetId** | **long** | | [optional] +**Quantity** | **int** | | [optional] +**ShipDate** | **DateTime** | | [optional] **Status** | **string** | Order Status | [optional] -**Complete** | **bool?** | | [optional] [default to false] +**Complete** | **bool** | | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/OuterComposite.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/OuterComposite.md index 4091cd23f2e1..4f026f75b74d 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/OuterComposite.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/OuterComposite.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MyNumber** | **decimal?** | | [optional] +**MyNumber** | **decimal** | | [optional] **MyString** | **string** | | [optional] -**MyBoolean** | **bool?** | | [optional] +**MyBoolean** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Pet.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Pet.md index 0ac711337aa8..348d5c8d2217 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Pet.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Pet.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long?** | | [optional] +**Id** | **long** | | [optional] **Category** | [**Category**](Category.md) | | [optional] **Name** | **string** | | **PhotoUrls** | **List<string>** | | diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/PetApi.md index 33ba114304a4..a7b361f05abe 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/PetApi.md @@ -78,7 +78,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long? petId, string apiKey = null) +> void DeletePet (long petId, string apiKey = null) Deletes a pet @@ -100,7 +100,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var petId = 789; // long? | Pet id to delete + var petId = 789; // long | Pet id to delete var apiKey = apiKey_example; // string | (optional) try @@ -121,7 +121,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **long?**| Pet id to delete | + **petId** | **long**| Pet id to delete | **apiKey** | **string**| | [optional] ### Return type @@ -269,7 +269,7 @@ Name | Type | Description | Notes # **GetPetById** -> Pet GetPetById (long? petId) +> Pet GetPetById (long petId) Find pet by ID @@ -295,7 +295,7 @@ namespace Example // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to return + var petId = 789; // long | ID of pet to return try { @@ -316,7 +316,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to return | + **petId** | **long**| ID of pet to return | ### Return type @@ -396,7 +396,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long? petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, string name = null, string status = null) Updates a pet in the store with form data @@ -418,7 +418,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet that needs to be updated + var petId = 789; // long | ID of pet that needs to be updated var name = name_example; // string | Updated name of the pet (optional) var status = status_example; // string | Updated status of the pet (optional) @@ -440,7 +440,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet that needs to be updated | + **petId** | **long**| ID of pet that needs to be updated | **name** | **string**| Updated name of the pet | [optional] **status** | **string**| Updated status of the pet | [optional] @@ -461,7 +461,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) uploads an image @@ -483,7 +483,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update + var petId = 789; // long | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) @@ -506,7 +506,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | + **petId** | **long**| ID of pet to update | **additionalMetadata** | **string**| Additional data to pass to server | [optional] **file** | **System.IO.Stream****System.IO.Stream**| file to upload | [optional] @@ -527,7 +527,7 @@ Name | Type | Description | Notes # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) uploads an image (required) @@ -549,7 +549,7 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(); - var petId = 789; // long? | ID of pet to update + var petId = 789; // long | ID of pet to update var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) @@ -572,7 +572,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **long?**| ID of pet to update | + **petId** | **long**| ID of pet to update | **requiredFile** | **System.IO.Stream****System.IO.Stream**| file to upload | **additionalMetadata** | **string**| Additional data to pass to server | [optional] diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Return.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Return.md index 21a269c63f4b..d7266acb7d77 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Return.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Return.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Return** | **int?** | | [optional] +**_Return** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/SpecialModelName.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/SpecialModelName.md index 306e65392a2e..e0008731e604 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/SpecialModelName.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/SpecialModelName.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long?** | | [optional] +**SpecialPropertyName** | **long** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/StoreApi.md index dbcf53db6160..947a0304ce82 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/StoreApi.md @@ -72,7 +72,7 @@ No authorization required # **GetInventory** -> Dictionary GetInventory () +> Dictionary GetInventory () Returns pet inventories by status @@ -102,7 +102,7 @@ namespace Example try { // Returns pet inventories by status - Dictionary<string, int?> result = apiInstance.GetInventory(); + Dictionary<string, int> result = apiInstance.GetInventory(); Debug.WriteLine(result); } catch (Exception e) @@ -119,7 +119,7 @@ This endpoint does not need any parameter. ### Return type -**Dictionary** +**Dictionary** ### Authorization @@ -134,7 +134,7 @@ This endpoint does not need any parameter. # **GetOrderById** -> Order GetOrderById (long? orderId) +> Order GetOrderById (long orderId) Find purchase order by ID @@ -155,7 +155,7 @@ namespace Example public void main() { var apiInstance = new StoreApi(); - var orderId = 789; // long? | ID of pet that needs to be fetched + var orderId = 789; // long | ID of pet that needs to be fetched try { @@ -176,7 +176,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderId** | **long?**| ID of pet that needs to be fetched | + **orderId** | **long**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Tag.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Tag.md index 6a76c28595f7..718effdb02a9 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Tag.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/Tag.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long?** | | [optional] +**Id** | **long** | | [optional] **Name** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/User.md b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/User.md index 04dd24a3423c..e3deddebc205 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/User.md +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/docs/User.md @@ -3,14 +3,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long?** | | [optional] +**Id** | **long** | | [optional] **Username** | **string** | | [optional] **FirstName** | **string** | | [optional] **LastName** | **string** | | [optional] **Email** | **string** | | [optional] **Password** | **string** | | [optional] **Phone** | **string** | | [optional] -**UserStatus** | **int?** | User Status | [optional] +**UserStatus** | **int** | User Status | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index fdf91b422df0..6fc0d974e359 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -74,22 +74,22 @@ namespace Org.OpenAPITools.Test { // 1st instance ArrayOfArrayOfNumberOnly instance1 = new ArrayOfArrayOfNumberOnly(); - List list1 = new List(); + List list1 = new List(); list1.Add(11.1m); list1.Add(8.9m); - List> listOfList1 = new List>(); + List> listOfList1 = new List>(); listOfList1.Add(list1); instance1.ArrayArrayNumber = listOfList1; // 2nd instance ArrayOfArrayOfNumberOnly instance2 = new ArrayOfArrayOfNumberOnly(); - List list2 = new List(); + List list2 = new List(); list2.Add(11.1m); list2.Add(8.9m); - List> listOfList2 = new List>(); + List> listOfList2 = new List>(); listOfList2.Add(list2); instance2.ArrayArrayNumber = listOfList2; @@ -102,15 +102,14 @@ namespace Org.OpenAPITools.Test // 3rd instance ArrayOfArrayOfNumberOnly instance3 = new ArrayOfArrayOfNumberOnly(); - List list3 = new List(); + List list3 = new List(); list3.Add(11.1m); list3.Add(1.1m); // not the same as 8.9 - List> listOfList3 = new List>(); + List> listOfList3 = new List>(); instance2.ArrayArrayNumber = listOfList3; Assert.IsFalse(instance1.Equals(instance3)); - } } diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 5cc2cd7cd378..10817d7dbac1 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// public interface IAnotherFakeApi : IAnotherFakeApiSync, IAnotherFakeApiAsync { - + } /// @@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Api public partial class AnotherFakeApi : IAnotherFakeApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -280,6 +280,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index d969bfee0ed8..f4b6d78714d3 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -35,8 +35,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// bool? - bool? FakeOuterBooleanSerialize (bool? body = null); + /// bool + bool FakeOuterBooleanSerialize (bool? body = null); /// /// @@ -46,8 +46,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// ApiResponse of bool? - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); + /// ApiResponse of bool + ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = null); /// /// /// @@ -77,8 +77,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// decimal? - decimal? FakeOuterNumberSerialize (decimal? body = null); + /// decimal + decimal FakeOuterNumberSerialize (decimal? body = null); /// /// @@ -88,8 +88,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// ApiResponse of decimal? - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = null); + /// ApiResponse of decimal + ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = null); /// /// /// @@ -198,7 +198,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -222,7 +222,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// To test enum parameters /// @@ -272,7 +272,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); /// /// Fake endpoint to test group parameters (optional) @@ -288,7 +288,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); /// /// test inline additionalProperties /// @@ -350,8 +350,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// Task of bool? - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); + /// Task of bool + System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null); /// /// @@ -361,8 +361,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// Task of ApiResponse (bool?) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); + /// Task of ApiResponse (bool) + System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null); /// /// /// @@ -392,8 +392,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of decimal? - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null); + /// Task of decimal + System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null); /// /// @@ -403,8 +403,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of ApiResponse (decimal?) - System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null); + /// Task of ApiResponse (decimal) + System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null); /// /// /// @@ -513,7 +513,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -537,7 +537,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null); /// /// To test enum parameters /// @@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); /// /// Fake endpoint to test group parameters (optional) @@ -603,7 +603,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); + System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null); /// /// test inline additionalProperties /// @@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api /// public interface IFakeApi : IFakeApiSync, IFakeApiAsync { - + } /// @@ -665,7 +665,7 @@ namespace Org.OpenAPITools.Api public partial class FakeApi : IFakeApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -720,7 +720,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -773,10 +773,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// bool? - public bool? FakeOuterBooleanSerialize (bool? body = null) + /// bool + public bool FakeOuterBooleanSerialize (bool? body = null) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -785,10 +785,9 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// ApiResponse of bool? - public Org.OpenAPITools.Client.ApiResponse< bool? > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) + /// ApiResponse of bool + public Org.OpenAPITools.Client.ApiResponse< bool > FakeOuterBooleanSerializeWithHttpInfo (bool? body = null) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -810,7 +809,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = this.Client.Post< bool? >("/fake/outer/boolean", requestOptions, this.Configuration); + var response = this.Client.Post< bool >("/fake/outer/boolean", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -826,10 +825,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// Task of bool? - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) + /// Task of bool + public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = null) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterBooleanSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -839,8 +838,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input boolean as post body (optional) - /// Task of ApiResponse (bool?) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) + /// Task of ApiResponse (bool) + public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeAsyncWithHttpInfo (bool? body = null) { Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -864,7 +863,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", requestOptions, this.Configuration); + var response = await this.AsynchronousClient.PostAsync("/fake/outer/boolean", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -895,7 +894,6 @@ namespace Org.OpenAPITools.Api /// ApiResponse of OuterComposite public Org.OpenAPITools.Client.ApiResponse< OuterComposite > FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = null) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -987,10 +985,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// decimal? - public decimal? FakeOuterNumberSerialize (decimal? body = null) + /// decimal + public decimal FakeOuterNumberSerialize (decimal? body = null) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); + Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); return localVarResponse.Data; } @@ -999,10 +997,9 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// ApiResponse of decimal? - public Org.OpenAPITools.Client.ApiResponse< decimal? > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null) + /// ApiResponse of decimal + public Org.OpenAPITools.Client.ApiResponse< decimal > FakeOuterNumberSerializeWithHttpInfo (decimal? body = null) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1024,7 +1021,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = this.Client.Post< decimal? >("/fake/outer/number", requestOptions, this.Configuration); + var response = this.Client.Post< decimal >("/fake/outer/number", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -1040,10 +1037,10 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of decimal? - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null) + /// Task of decimal + public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = null) { - Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); + Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterNumberSerializeAsyncWithHttpInfo(body); return localVarResponse.Data; } @@ -1053,8 +1050,8 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// Input number as post body (optional) - /// Task of ApiResponse (decimal?) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null) + /// Task of ApiResponse (decimal) + public async System.Threading.Tasks.Task> FakeOuterNumberSerializeAsyncWithHttpInfo (decimal? body = null) { Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1078,7 +1075,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.PostAsync("/fake/outer/number", requestOptions, this.Configuration); + var response = await this.AsynchronousClient.PostAsync("/fake/outer/number", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -1109,7 +1106,6 @@ namespace Org.OpenAPITools.Api /// ApiResponse of string public Org.OpenAPITools.Client.ApiResponse< string > FakeOuterStringSerializeWithHttpInfo (string body = null) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1275,6 +1271,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1331,6 +1328,7 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'query' is set if (query == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + // verify the required parameter 'body' is set if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); @@ -1402,10 +1400,12 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'query' is set if (query == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); + // verify the required parameter 'body' is set if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1530,6 +1530,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1582,7 +1583,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// - public void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -1606,17 +1607,20 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { // verify the required parameter 'number' is set if (number == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter '_double' is set if (_double == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter '_byte' is set if (_byte == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); @@ -1733,7 +1737,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { await TestEndpointParametersAsyncWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); @@ -1758,21 +1762,25 @@ namespace Org.OpenAPITools.Api /// None (optional) /// None (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) { // verify the required parameter 'number' is set if (number == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter '_double' is set if (_double == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); + // verify the required parameter '_byte' is set if (_byte == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1899,7 +1907,6 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -2112,7 +2119,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// - public void TestGroupParameters (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) { TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); } @@ -2128,14 +2135,16 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public Org.OpenAPITools.Client.ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); @@ -2225,7 +2234,7 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) { await TestGroupParametersAsyncWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); @@ -2242,18 +2251,21 @@ namespace Org.OpenAPITools.Api /// Boolean in group parameters (optional) /// Integer in group parameters (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int? requiredStringGroup, bool? requiredBooleanGroup, long? requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) + public async System.Threading.Tasks.Task> TestGroupParametersAsyncWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); + // verify the required parameter 'requiredBooleanGroup' is set if (requiredBooleanGroup == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); + // verify the required parameter 'requiredInt64Group' is set if (requiredInt64Group == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -2407,6 +2419,7 @@ namespace Org.OpenAPITools.Api if (param == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -2463,6 +2476,7 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'param' is set if (param == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + // verify the required parameter 'param2' is set if (param2 == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); @@ -2531,10 +2545,12 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'param' is set if (param == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); + // verify the required parameter 'param2' is set if (param2 == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 732227a1e3bc..61b5a0d404f9 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// public interface IFakeClassnameTags123Api : IFakeClassnameTags123ApiSync, IFakeClassnameTags123ApiAsync { - + } /// @@ -95,7 +95,7 @@ namespace Org.OpenAPITools.Api public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -150,7 +150,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -291,6 +291,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 060be91a2724..0068cdbccb9b 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -58,7 +58,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - void DeletePet (long? petId, string apiKey = null); + void DeletePet (long petId, string apiKey = null); /// /// Deletes a pet @@ -70,7 +70,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); + ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null); /// /// Finds Pets by status /// @@ -122,7 +122,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Pet - Pet GetPetById (long? petId); + Pet GetPetById (long petId); /// /// Find pet by ID @@ -133,7 +133,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long? petId); + ApiResponse GetPetByIdWithHttpInfo (long petId); /// /// Update an existing pet /// @@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - void UpdatePetWithForm (long? petId, string name = null, string status = null); + void UpdatePetWithForm (long petId, string name = null, string status = null); /// /// Updates a pet in the store with form data @@ -179,7 +179,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long? petId, string name = null, string status = null); + ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null); /// /// uploads an image /// @@ -191,7 +191,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image @@ -204,7 +204,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image (required) /// @@ -216,7 +216,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); /// /// uploads an image (required) @@ -229,7 +229,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null); + ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); #endregion Synchronous Operations } @@ -270,7 +270,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null); + System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null); /// /// Deletes a pet @@ -282,7 +282,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null); + System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null); /// /// Finds Pets by status /// @@ -334,7 +334,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync (long? petId); + System.Threading.Tasks.Task GetPetByIdAsync (long petId); /// /// Find pet by ID @@ -345,7 +345,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long? petId); + System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long petId); /// /// Update an existing pet /// @@ -378,7 +378,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long? petId, string name = null, string status = null); + System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null); /// /// Updates a pet in the store with form data @@ -391,7 +391,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long? petId, string name = null, string status = null); + System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null); /// /// uploads an image /// @@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image @@ -416,7 +416,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image (required) /// @@ -428,7 +428,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); /// /// uploads an image (required) @@ -441,7 +441,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null); + System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null); #endregion Asynchronous Operations } @@ -450,7 +450,7 @@ namespace Org.OpenAPITools.Api /// public interface IPetApi : IPetApiSync, IPetApiAsync { - + } /// @@ -459,7 +459,7 @@ namespace Org.OpenAPITools.Api public partial class PetApi : IPetApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -514,7 +514,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -648,6 +648,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -694,7 +695,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// - public void DeletePet (long? petId, string apiKey = null) + public void DeletePet (long petId, string apiKey = null) { DeletePetWithHttpInfo(petId, apiKey); } @@ -706,7 +707,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -759,7 +760,7 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long? petId, string apiKey = null) + public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = null) { await DeletePetAsyncWithHttpInfo(petId, apiKey); @@ -772,12 +773,13 @@ namespace Org.OpenAPITools.Api /// Pet id to delete /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null) + public async System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long petId, string apiKey = null) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -915,6 +917,7 @@ namespace Org.OpenAPITools.Api if (status == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1060,6 +1063,7 @@ namespace Org.OpenAPITools.Api if (tags == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1114,7 +1118,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Pet - public Pet GetPetById (long? petId) + public Pet GetPetById (long petId) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); return localVarResponse.Data; @@ -1126,7 +1130,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// ApiResponse of Pet - public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId) + public Org.OpenAPITools.Client.ApiResponse< Pet > GetPetByIdWithHttpInfo (long petId) { // verify the required parameter 'petId' is set if (petId == null) @@ -1177,7 +1181,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync (long? petId) + public async System.Threading.Tasks.Task GetPetByIdAsync (long petId) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetPetByIdAsyncWithHttpInfo(petId); return localVarResponse.Data; @@ -1190,12 +1194,13 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet to return /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long? petId) + public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long petId) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1321,6 +1326,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1368,7 +1374,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// - public void UpdatePetWithForm (long? petId, string name = null, string status = null) + public void UpdatePetWithForm (long petId, string name = null, string status = null) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1381,7 +1387,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long? petId, string name = null, string status = null) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = null, string status = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -1442,7 +1448,7 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long? petId, string name = null, string status = null) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = null, string status = null) { await UpdatePetWithFormAsyncWithHttpInfo(petId, name, status); @@ -1456,12 +1462,13 @@ namespace Org.OpenAPITools.Api /// Updated name of the pet (optional) /// Updated status of the pet (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long? petId, string name = null, string status = null) + public async System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (long petId, string name = null, string status = null) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1517,7 +1524,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse - public ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null) + public ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1531,7 +1538,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -1593,7 +1600,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = null, System.IO.Stream file = null) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1608,12 +1615,13 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long petId, string additionalMetadata = null, System.IO.Stream file = null) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1670,7 +1678,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1684,11 +1692,12 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public Org.OpenAPITools.Client.ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); @@ -1749,7 +1758,7 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -1764,15 +1773,17 @@ namespace Org.OpenAPITools.Api /// file to upload /// Additional data to pass to server (optional) /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) { // verify the required parameter 'petId' is set if (petId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); + // verify the required parameter 'requiredFile' is set if (requiredFile == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 4372f115f325..25d14b5a549c 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -55,8 +55,8 @@ namespace Org.OpenAPITools.Api /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Dictionary<string, int?> - Dictionary GetInventory (); + /// Dictionary<string, int> + Dictionary GetInventory (); /// /// Returns pet inventories by status @@ -65,8 +65,8 @@ namespace Org.OpenAPITools.Api /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int?> - ApiResponse> GetInventoryWithHttpInfo (); + /// ApiResponse of Dictionary<string, int> + ApiResponse> GetInventoryWithHttpInfo (); /// /// Find purchase order by ID /// @@ -76,7 +76,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Order - Order GetOrderById (long? orderId); + Order GetOrderById (long orderId); /// /// Find purchase order by ID @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long? orderId); + ApiResponse GetOrderByIdWithHttpInfo (long orderId); /// /// Place an order for a pet /// @@ -146,8 +146,8 @@ namespace Org.OpenAPITools.Api /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Task of Dictionary<string, int?> - System.Threading.Tasks.Task> GetInventoryAsync (); + /// Task of Dictionary<string, int> + System.Threading.Tasks.Task> GetInventoryAsync (); /// /// Returns pet inventories by status @@ -156,8 +156,8 @@ namespace Org.OpenAPITools.Api /// Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Task of ApiResponse (Dictionary<string, int?>) - System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo (); + /// Task of ApiResponse (Dictionary<string, int>) + System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo (); /// /// Find purchase order by ID /// @@ -167,7 +167,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync (long? orderId); + System.Threading.Tasks.Task GetOrderByIdAsync (long orderId); /// /// Find purchase order by ID @@ -178,7 +178,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long? orderId); + System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long orderId); /// /// Place an order for a pet /// @@ -208,7 +208,7 @@ namespace Org.OpenAPITools.Api /// public interface IStoreApi : IStoreApiSync, IStoreApiAsync { - + } /// @@ -217,7 +217,7 @@ namespace Org.OpenAPITools.Api public partial class StoreApi : IStoreApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -272,7 +272,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -399,6 +399,7 @@ namespace Org.OpenAPITools.Api if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -435,10 +436,10 @@ namespace Org.OpenAPITools.Api /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Dictionary<string, int?> - public Dictionary GetInventory () + /// Dictionary<string, int> + public Dictionary GetInventory () { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); return localVarResponse.Data; } @@ -446,10 +447,9 @@ namespace Org.OpenAPITools.Api /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int?> - public Org.OpenAPITools.Client.ApiResponse< Dictionary > GetInventoryWithHttpInfo () + /// ApiResponse of Dictionary<string, int> + public Org.OpenAPITools.Client.ApiResponse< Dictionary > GetInventoryWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -475,7 +475,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = this.Client.Get< Dictionary >("/store/inventory", requestOptions, this.Configuration); + var response = this.Client.Get< Dictionary >("/store/inventory", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -490,10 +490,10 @@ namespace Org.OpenAPITools.Api /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Task of Dictionary<string, int?> - public async System.Threading.Tasks.Task> GetInventoryAsync () + /// Task of Dictionary<string, int> + public async System.Threading.Tasks.Task> GetInventoryAsync () { - Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryAsyncWithHttpInfo(); + Org.OpenAPITools.Client.ApiResponse> localVarResponse = await GetInventoryAsyncWithHttpInfo(); return localVarResponse.Data; } @@ -502,8 +502,8 @@ namespace Org.OpenAPITools.Api /// Returns pet inventories by status Returns a map of status codes to quantities /// /// Thrown when fails to make API call - /// Task of ApiResponse (Dictionary<string, int?>) - public async System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo () + /// Task of ApiResponse (Dictionary<string, int>) + public async System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo () { Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -531,7 +531,7 @@ namespace Org.OpenAPITools.Api // make the HTTP request - var response = await this.AsynchronousClient.GetAsync>("/store/inventory", requestOptions, this.Configuration); + var response = await this.AsynchronousClient.GetAsync>("/store/inventory", requestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -548,7 +548,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Order - public Order GetOrderById (long? orderId) + public Order GetOrderById (long orderId) { Org.OpenAPITools.Client.ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); return localVarResponse.Data; @@ -560,7 +560,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of Order - public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long? orderId) + public Org.OpenAPITools.Client.ApiResponse< Order > GetOrderByIdWithHttpInfo (long orderId) { // verify the required parameter 'orderId' is set if (orderId == null) @@ -606,7 +606,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync (long? orderId) + public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await GetOrderByIdAsyncWithHttpInfo(orderId); return localVarResponse.Data; @@ -619,12 +619,13 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long? orderId) + public async System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (long orderId) { // verify the required parameter 'orderId' is set if (orderId == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -741,6 +742,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs index 6438d62fdaa2..58721f5e62e2 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs @@ -384,7 +384,7 @@ namespace Org.OpenAPITools.Api /// public interface IUserApi : IUserApiSync, IUserApiAsync { - + } /// @@ -393,7 +393,7 @@ namespace Org.OpenAPITools.Api public partial class UserApi : IUserApi { private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - + /// /// Initializes a new instance of the class. /// @@ -448,7 +448,7 @@ namespace Org.OpenAPITools.Api if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); - + this.Client = client; this.AsynchronousClient = asyncClient; this.Configuration = configuration; @@ -574,6 +574,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -683,6 +684,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -792,6 +794,7 @@ namespace Org.OpenAPITools.Api if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -902,6 +905,7 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1017,6 +1021,7 @@ namespace Org.OpenAPITools.Api if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1076,6 +1081,7 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'username' is set if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + // verify the required parameter 'password' is set if (password == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); @@ -1158,10 +1164,12 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'username' is set if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); + // verify the required parameter 'password' is set if (password == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1231,7 +1239,6 @@ namespace Org.OpenAPITools.Api /// ApiResponse of Object(void) public Org.OpenAPITools.Client.ApiResponse LogoutUserWithHttpInfo () { - Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { @@ -1335,6 +1342,7 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'username' is set if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + // verify the required parameter 'body' is set if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); @@ -1397,10 +1405,12 @@ namespace Org.OpenAPITools.Api // verify the required parameter 'username' is set if (username == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); + // verify the required parameter 'body' is set if (body == null) throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); + Org.OpenAPITools.Client.RequestOptions requestOptions = new Org.OpenAPITools.Client.RequestOptions(); String[] @contentTypes = new String[] { diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs index c6c036185f84..e28fc9795de7 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model /// code. /// type. /// message. - public ApiResponse(int? code = default(int?), string type = default(string), string message = default(string)) + public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) { this.Code = code; this.Type = type; @@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Code /// [DataMember(Name="code", EmitDefaultValue=false)] - public int? Code { get; set; } + public int Code { get; set; } /// /// Gets or Sets Type diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index c07787171eb7..4de9ac9adf6f 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) { this.ArrayArrayNumber = arrayArrayNumber; } @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ArrayArrayNumber /// [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } + public List> ArrayArrayNumber { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 9e78493af53e..2ee74e404a90 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) + public ArrayOfNumberOnly(List arrayNumber = default(List)) { this.ArrayNumber = arrayNumber; } @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ArrayNumber /// [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } + public List ArrayNumber { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs index 592677aecda6..334cc67e6189 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model /// arrayOfString. /// arrayArrayOfInteger. /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) + public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) { this.ArrayOfString = arrayOfString; this.ArrayArrayOfInteger = arrayArrayOfInteger; @@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ArrayArrayOfInteger /// [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } + public List> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs index 1d08b561e75c..053b9409fdbe 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs @@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model /// declawed. /// className (required). /// color (default to "red"). - public Cat(bool? declawed = default(bool?), string className = default(string), string color = "red") : base(className, color) + public Cat(bool declawed = default(bool), string className = default(string), string color = "red") : base(className, color) { this.Declawed = declawed; } @@ -52,7 +52,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Declawed /// [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool? Declawed { get; set; } + public bool Declawed { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs index 49a66e58c828..0099aca04ea5 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs @@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model /// /// id. /// name (required) (default to "default-name"). - public Category(long? id = default(long?), string name = "default-name") + public Category(long id = default(long), string name = "default-name") { // to ensure "name" is required (not null) if (name == null) @@ -60,7 +60,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets Name diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs index 529cf5fe5eb9..12b78823a093 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs @@ -53,7 +53,7 @@ namespace Org.OpenAPITools.Model /// dateTime. /// uuid. /// password (required). - public FormatTest(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), Guid? uuid = default(Guid?), string password = default(string)) + public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string)) { // to ensure "number" is required (not null) if (number == null) @@ -106,37 +106,37 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Integer /// [DataMember(Name="integer", EmitDefaultValue=false)] - public int? Integer { get; set; } + public int Integer { get; set; } /// /// Gets or Sets Int32 /// [DataMember(Name="int32", EmitDefaultValue=false)] - public int? Int32 { get; set; } + public int Int32 { get; set; } /// /// Gets or Sets Int64 /// [DataMember(Name="int64", EmitDefaultValue=false)] - public long? Int64 { get; set; } + public long Int64 { get; set; } /// /// Gets or Sets Number /// [DataMember(Name="number", EmitDefaultValue=false)] - public decimal? Number { get; set; } + public decimal Number { get; set; } /// /// Gets or Sets Float /// [DataMember(Name="float", EmitDefaultValue=false)] - public float? Float { get; set; } + public float Float { get; set; } /// /// Gets or Sets Double /// [DataMember(Name="double", EmitDefaultValue=false)] - public double? Double { get; set; } + public double Double { get; set; } /// /// Gets or Sets String @@ -161,19 +161,19 @@ namespace Org.OpenAPITools.Model /// [DataMember(Name="date", EmitDefaultValue=false)] [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? Date { get; set; } + public DateTime Date { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime? DateTime { get; set; } + public DateTime DateTime { get; set; } /// /// Gets or Sets Uuid /// [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid? Uuid { get; set; } + public Guid Uuid { get; set; } /// /// Gets or Sets Password @@ -281,62 +281,62 @@ namespace Org.OpenAPITools.Model /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - // Integer (int?) maximum - if(this.Integer > (int?)100) + // Integer (int) maximum + if(this.Integer > (int)100) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); } - // Integer (int?) minimum - if(this.Integer < (int?)10) + // Integer (int) minimum + if(this.Integer < (int)10) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); } - // Int32 (int?) maximum - if(this.Int32 > (int?)200) + // Int32 (int) maximum + if(this.Int32 > (int)200) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); } - // Int32 (int?) minimum - if(this.Int32 < (int?)20) + // Int32 (int) minimum + if(this.Int32 < (int)20) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); } - // Number (decimal?) maximum - if(this.Number > (decimal?)543.2) + // Number (decimal) maximum + if(this.Number > (decimal)543.2) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" }); } - // Number (decimal?) minimum - if(this.Number < (decimal?)32.1) + // Number (decimal) minimum + if(this.Number < (decimal)32.1) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" }); } - // Float (float?) maximum - if(this.Float > (float?)987.6) + // Float (float) maximum + if(this.Float > (float)987.6) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" }); } - // Float (float?) minimum - if(this.Float < (float?)54.3) + // Float (float) minimum + if(this.Float < (float)54.3) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); } - // Double (double?) maximum - if(this.Double > (double?)123.4) + // Double (double) maximum + if(this.Double > (double)123.4) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" }); } - // Double (double?) minimum - if(this.Double < (double?)67.8) + // Double (double) minimum + if(this.Double < (double)67.8) { yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); } diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs index 9b0c328cd79a..b04d1ed442fb 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs @@ -65,7 +65,7 @@ namespace Org.OpenAPITools.Model /// mapOfEnumString. /// directMap. /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) + public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) { this.MapMapOfString = mapMapOfString; this.MapOfEnumString = mapOfEnumString; @@ -83,13 +83,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets DirectMap /// [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } + public Dictionary DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } + public Dictionary IndirectMap { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 38a3eb682295..8ae71edaf8bf 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model /// uuid. /// dateTime. /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid? uuid = default(Guid?), DateTime? dateTime = default(DateTime?), Dictionary map = default(Dictionary)) + public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) { this.Uuid = uuid; this.DateTime = dateTime; @@ -49,13 +49,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Uuid /// [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid? Uuid { get; set; } + public Guid Uuid { get; set; } /// /// Gets or Sets DateTime /// [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime? DateTime { get; set; } + public DateTime DateTime { get; set; } /// /// Gets or Sets Map diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs index de38ee1704cd..56010fc79238 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs @@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model /// /// name. /// _class. - public Model200Response(int? name = default(int?), string _class = default(string)) + public Model200Response(int name = default(int), string _class = default(string)) { this.Name = name; this.Class = _class; @@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Name /// [DataMember(Name="name", EmitDefaultValue=false)] - public int? Name { get; set; } + public int Name { get; set; } /// /// Gets or Sets Class diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs index 140149c02579..84fefb6ca23b 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs @@ -42,7 +42,7 @@ namespace Org.OpenAPITools.Model /// /// name (required). /// property. - public Name(int? name = default(int?), string property = default(string)) + public Name(int name = default(int), string property = default(string)) { // to ensure "name" is required (not null) if (name == null) @@ -60,13 +60,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets _Name /// [DataMember(Name="name", EmitDefaultValue=false)] - public int? _Name { get; set; } + public int _Name { get; set; } /// /// Gets or Sets SnakeCase /// [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int? SnakeCase { get; private set; } + public int SnakeCase { get; private set; } /// /// Gets or Sets Property @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets _123Number /// [DataMember(Name="123Number", EmitDefaultValue=false)] - public int? _123Number { get; private set; } + public int _123Number { get; private set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs index 54a03abdfcb9..8e838a08ed1b 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// justNumber. - public NumberOnly(decimal? justNumber = default(decimal?)) + public NumberOnly(decimal justNumber = default(decimal)) { this.JustNumber = justNumber; } @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets JustNumber /// [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal? JustNumber { get; set; } + public decimal JustNumber { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs index 6a1823c7d6ff..d13d7c87276e 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs @@ -74,7 +74,7 @@ namespace Org.OpenAPITools.Model /// shipDate. /// Order Status. /// complete (default to false). - public Order(long? id = default(long?), long? petId = default(long?), int? quantity = default(int?), DateTime? shipDate = default(DateTime?), StatusEnum? status = default(StatusEnum?), bool? complete = false) + public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) { this.Id = id; this.PetId = petId; @@ -96,31 +96,31 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets PetId /// [DataMember(Name="petId", EmitDefaultValue=false)] - public long? PetId { get; set; } + public long PetId { get; set; } /// /// Gets or Sets Quantity /// [DataMember(Name="quantity", EmitDefaultValue=false)] - public int? Quantity { get; set; } + public int Quantity { get; set; } /// /// Gets or Sets ShipDate /// [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime? ShipDate { get; set; } + public DateTime ShipDate { get; set; } /// /// Gets or Sets Complete /// [DataMember(Name="complete", EmitDefaultValue=false)] - public bool? Complete { get; set; } + public bool Complete { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs index b5cf177c4c31..b3ea0bd5e04e 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -38,7 +38,7 @@ namespace Org.OpenAPITools.Model /// myNumber. /// myString. /// myBoolean. - public OuterComposite(decimal? myNumber = default(decimal?), string myString = default(string), bool? myBoolean = default(bool?)) + public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) { this.MyNumber = myNumber; this.MyString = myString; @@ -49,7 +49,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets MyNumber /// [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal? MyNumber { get; set; } + public decimal MyNumber { get; set; } /// /// Gets or Sets MyString @@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets MyBoolean /// [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool? MyBoolean { get; set; } + public bool MyBoolean { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs index e5584f13e281..8f07820954d6 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs @@ -79,7 +79,7 @@ namespace Org.OpenAPITools.Model /// photoUrls (required). /// tags. /// pet status in the store. - public Pet(long? id = default(long?), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) + public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) { // to ensure "name" is required (not null) if (name == null) @@ -109,7 +109,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets Category diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs index c63f40c8efe3..8ec49c13906b 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// _return. - public Return(int? _return = default(int?)) + public Return(int _return = default(int)) { this._Return = _return; } @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets _Return /// [DataMember(Name="return", EmitDefaultValue=false)] - public int? _Return { get; set; } + public int _Return { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs index 0c5d06f53e77..d7cff99d127c 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// specialPropertyName. - public SpecialModelName(long? specialPropertyName = default(long?)) + public SpecialModelName(long specialPropertyName = default(long)) { this.SpecialPropertyName = specialPropertyName; } @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets SpecialPropertyName /// [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long? SpecialPropertyName { get; set; } + public long SpecialPropertyName { get; set; } /// /// Returns the string presentation of the object diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs index af5cb2ca655b..f7517d82f1e0 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs @@ -37,7 +37,7 @@ namespace Org.OpenAPITools.Model /// /// id. /// name. - public Tag(long? id = default(long?), string name = default(string)) + public Tag(long id = default(long), string name = default(string)) { this.Id = id; this.Name = name; @@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets Name diff --git a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs index 7e48ab5abb1f..6905abd8c7a6 100644 --- a/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-refactor/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs @@ -43,7 +43,7 @@ namespace Org.OpenAPITools.Model /// password. /// phone. /// User Status. - public User(long? id = default(long?), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int? userStatus = default(int?)) + public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) { this.Id = id; this.Username = username; @@ -59,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets Username @@ -102,7 +102,7 @@ namespace Org.OpenAPITools.Model /// /// User Status [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int? UserStatus { get; set; } + public int UserStatus { get; set; } /// /// Returns the string presentation of the object