From 2d927a738b1758c2213464e10985ee5124a091c6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 19 Jan 2022 18:43:39 +0800 Subject: [PATCH] Improve example value handling in C# generators (#11355) * improve example value handling in C# generators * fix typo * update samples --- .../languages/AbstractCSharpCodegen.java | 150 ++++++++++++++---- .../docs/MultipartApi.md | 4 +- .../docs/FakeApi.md | 44 ++--- .../docs/PetApi.md | 24 +-- .../docs/StoreApi.md | 4 +- .../docs/UserApi.md | 10 +- .../OpenAPIClient-httpclient/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-httpclient/docs/PetApi.md | 24 +-- .../OpenAPIClient-httpclient/docs/StoreApi.md | 4 +- .../OpenAPIClient-httpclient/docs/UserApi.md | 10 +- .../OpenAPIClient-net47/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-net47/docs/PetApi.md | 24 +-- .../OpenAPIClient-net47/docs/StoreApi.md | 4 +- .../OpenAPIClient-net47/docs/UserApi.md | 10 +- .../OpenAPIClient-net5.0/docs/FakeApi.md | 44 ++--- .../OpenAPIClient-net5.0/docs/PetApi.md | 24 +-- .../OpenAPIClient-net5.0/docs/StoreApi.md | 4 +- .../OpenAPIClient-net5.0/docs/UserApi.md | 10 +- .../OpenAPIClient/docs/FakeApi.md | 44 ++--- .../OpenAPIClient/docs/PetApi.md | 24 +-- .../OpenAPIClient/docs/StoreApi.md | 4 +- .../OpenAPIClient/docs/UserApi.md | 10 +- .../OpenAPIClientCore/docs/FakeApi.md | 44 ++--- .../OpenAPIClientCore/docs/PetApi.md | 24 +-- .../OpenAPIClientCore/docs/StoreApi.md | 4 +- .../OpenAPIClientCore/docs/UserApi.md | 10 +- .../OpenAPIClientCoreAndNet47/docs/PetApi.md | 18 +-- .../docs/StoreApi.md | 4 +- .../OpenAPIClientCoreAndNet47/docs/UserApi.md | 10 +- .../csharp/OpenAPIClient/docs/FakeApi.md | 52 +++--- .../csharp/OpenAPIClient/docs/PetApi.md | 24 +-- .../csharp/OpenAPIClient/docs/StoreApi.md | 4 +- .../csharp/OpenAPIClient/docs/UserApi.md | 10 +- 33 files changed, 425 insertions(+), 343 deletions(-) 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 2a8977310f7..bb8f9901765 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 @@ -1261,42 +1261,124 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } @Override - public void setParameterExampleValue(CodegenParameter codegenParameter) { + public void setParameterExampleValue(CodegenParameter p) { + String example; - // set the example value - // if not specified in x-example, generate a default value - // TODO need to revise how to obtain the example value - if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { - codegenParameter.example = Json.pretty(codegenParameter.vendorExtensions.get("x-example")); - } else if (Boolean.TRUE.equals(codegenParameter.isBoolean)) { - codegenParameter.example = "true"; - } else if (Boolean.TRUE.equals(codegenParameter.isLong)) { - codegenParameter.example = "789"; - } else if (Boolean.TRUE.equals(codegenParameter.isInteger)) { - codegenParameter.example = "56"; - } else if (Boolean.TRUE.equals(codegenParameter.isFloat)) { - codegenParameter.example = "3.4F"; - } else if (Boolean.TRUE.equals(codegenParameter.isDouble)) { - codegenParameter.example = "1.2D"; - } else if (Boolean.TRUE.equals(codegenParameter.isNumber)) { - codegenParameter.example = "8.14"; - } else if (Boolean.TRUE.equals(codegenParameter.isBinary)) { - codegenParameter.example = "BINARY_DATA_HERE"; - } else if (Boolean.TRUE.equals(codegenParameter.isByteArray)) { - codegenParameter.example = "BYTE_ARRAY_DATA_HERE"; - } else if (Boolean.TRUE.equals(codegenParameter.isFile)) { - codegenParameter.example = "/path/to/file.txt"; - } else if (Boolean.TRUE.equals(codegenParameter.isDate)) { - codegenParameter.example = "2013-10-20"; - } else if (Boolean.TRUE.equals(codegenParameter.isDateTime)) { - codegenParameter.example = "2013-10-20T19:20:30+01:00"; - } else if (Boolean.TRUE.equals(codegenParameter.isUuid)) { - codegenParameter.example = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; - } else if (Boolean.TRUE.equals(codegenParameter.isUri)) { - codegenParameter.example = "https://openapi-generator.tech"; - } else if (Boolean.TRUE.equals(codegenParameter.isString)) { - codegenParameter.example = codegenParameter.paramName + "_example"; + boolean hasAllowableValues = p.allowableValues != null && !p.allowableValues.isEmpty(); + if (hasAllowableValues) { + //support examples for inline enums + final List values = (List) p.allowableValues.get("values"); + example = String.valueOf(values.get(0)); + } else if (p.defaultValue == null) { + example = p.example; + } else { + example = p.defaultValue; } + + String type = p.baseType; + if (type == null) { + type = p.dataType; + } + + if (p.isString) { + if (example == null) { + example = p.paramName + "_example"; + } + example = "\"" + escapeText(example) + "\""; + } else if (p.isInteger || p.isShort) { + if (example == null) { + example = "56"; + } + } else if (p.isLong) { + if (example == null) { + example = "789"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "L"); + } else if (p.isFloat) { + if (example == null) { + example = "3.4F"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "F"); + } else if (p.isDouble) { + if (example == null) { + example = "1.2D"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "D"); + } else if (p.isNumber) { + if (example == null) { + example = "8.14"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "D"); + } else if (p.isBoolean) { + if (example == null) { + example = "true"; + } + } else if (p.isBinary || p.isFile) { + if (example == null) { + example = "/path/to/file.txt"; + } + example = "new System.IO.MemoryStream(System.IO.File.ReadAllBytes(\"" + escapeText(example) + "\"))"; + } else if (p.isByteArray) { + if (example == null) { + example = "BYTE_ARRAY_DATA_HERE"; + } + example = "System.Text.Encoding.ASCII.GetBytes(\"" + escapeText(example) + "\")"; + } else if (p.isDate) { + if (example == null) { + example = "DateTime.Parse(\"2013-10-20\")"; + } else { + example = "DateTime.Parse(\"" + example + "\")"; + } + } else if (p.isDateTime) { + if (example == null) { + example = "DateTime.Parse(\"2013-10-20T19:20:30+01:00\")"; + } else { + example = "DateTime.Parse(\"" + example + "\")"; + } + } else if (p.isDecimal) { + if (example == null) { + example = "8.9M"; + } + example = StringUtils.appendIfMissingIgnoreCase(example, "M"); + } else if (p.isUuid) { + if (example == null) { + example = "\"38400000-8cf0-11bd-b23e-10b96e4ef00d\""; + } else { + example = "\"" + example + "\""; + } + } else if (p.isUri) { + if (example == null) { + example = "new Uri(\"https://openapi-generator.tech\")"; + } else { + example = "new Uri(\"" + example + "\")"; + } + } else if (hasAllowableValues) { + //parameter is enum defined as a schema component + example = "(" + type + ") \"" + example + "\""; + } else if (!languageSpecificPrimitives.contains(type)) { + // type is a model class, e.g. User + example = "new " + type + "()"; + } + + if (example == null) { + example = "null"; + } else if (Boolean.TRUE.equals(p.isArray)) { + if (p.items.defaultValue != null) { + String innerExample; + if ("String".equals(p.items.dataType)) { + innerExample = "\"" + p.items.defaultValue + "\""; + } else { + innerExample = p.items.defaultValue; + } + example = "new List<" + p.items.dataType + ">({" + innerExample + "})"; + } else { + example = "new List<" + p.items.dataType + ">()"; + } + } else if (Boolean.TRUE.equals(p.isMap)) { + example = "new Dictionary"; + } + + p.example = example; } @Override diff --git a/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md b/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md index dbf9ae08743..c16dc5314f5 100644 --- a/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md +++ b/samples/client/others/csharp-netcore-complex-files/docs/MultipartApi.md @@ -103,7 +103,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new MultipartApi(config); - var file = BINARY_DATA_HERE; // System.IO.Stream | a file + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | a file var marker = new MultipartMixedMarker(); // MultipartMixedMarker | (optional) try @@ -174,7 +174,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; var apiInstance = new MultipartApi(config); - var file = BINARY_DATA_HERE; // System.IO.Stream | One file (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | One file (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md index 87c4c957148..8a5cb9aaf42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -767,13 +767,13 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md index aa5cd9f497b..f429575063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md index 24e2480d5de..963ecda9c14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md index aa12c26c69f..2f478081dc2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md index 635f38544d5..42e8aea5310 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md @@ -267,7 +267,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -341,7 +341,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -555,7 +555,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -709,20 +709,20 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // FileParameter | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -811,13 +811,13 @@ namespace Example HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -904,10 +904,10 @@ namespace Example var apiInstance = new FakeApi(httpClient, config, httpClientHandler); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1056,8 +1056,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new FakeApi(httpClient, config, httpClientHandler); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md index 43033c45b59..505380841a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md @@ -120,8 +120,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -359,7 +359,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -514,9 +514,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - 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) + var petId = 789L; // 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) try { @@ -593,9 +593,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - 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; // FileParameter | file to upload (optional) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | file to upload (optional) try { @@ -673,9 +673,9 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new PetApi(httpClient, config, httpClientHandler); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // FileParameter | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // FileParameter | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md index 248bf31f849..44bf0ce59ea 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md @@ -39,7 +39,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new StoreApi(httpClient, config, httpClientHandler); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -190,7 +190,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new StoreApi(httpClient, config, httpClientHandler); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md index 417d9002cf9..fe9ac2db818 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/UserApi.md @@ -261,7 +261,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -334,7 +334,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -409,8 +409,8 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -555,7 +555,7 @@ namespace Example HttpClient httpClient = new HttpClient(); HttpClientHandler httpClientHandler = new HttpClientHandler(); var apiInstance = new UserApi(httpClient, config, httpClientHandler); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md index 87c4c957148..8a5cb9aaf42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -767,13 +767,13 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md index aa5cd9f497b..f429575063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md index 24e2480d5de..963ecda9c14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md index aa12c26c69f..2f478081dc2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md index 87c4c957148..8a5cb9aaf42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -767,13 +767,13 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md index aa5cd9f497b..f429575063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md index 24e2480d5de..963ecda9c14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md index aa12c26c69f..2f478081dc2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 87c4c957148..8a5cb9aaf42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -767,13 +767,13 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index aa5cd9f497b..f429575063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md index 24e2480d5de..963ecda9c14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md index aa12c26c69f..2f478081dc2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 87c4c957148..8a5cb9aaf42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -251,7 +251,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -321,7 +321,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -669,20 +669,20 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -767,13 +767,13 @@ namespace Example config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -856,10 +856,10 @@ namespace Example var apiInstance = new FakeApi(config); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1000,8 +1000,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index aa5cd9f497b..f429575063c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -112,8 +112,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -339,7 +339,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -486,9 +486,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -561,9 +561,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -637,9 +637,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md index 24e2480d5de..963ecda9c14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md index aa12c26c69f..2f478081dc2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md @@ -245,7 +245,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -314,7 +314,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -385,8 +385,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -523,7 +523,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md index 4baa360aa75..109fec4f411 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/PetApi.md @@ -113,8 +113,8 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -340,7 +340,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(config); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -489,9 +489,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // 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) try { @@ -564,9 +564,9 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md index 8b1ba130f4c..a3c7f1f92be 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md @@ -35,7 +35,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new StoreApi(config); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -178,7 +178,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new StoreApi(config); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md index b7d26019ae9..39895547686 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/UserApi.md @@ -265,7 +265,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -334,7 +334,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -405,8 +405,8 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io/v2"; var apiInstance = new UserApi(config); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -553,7 +553,7 @@ namespace Example // config.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new UserApi(config); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index b38dea5dd37..93a9e0afbf0 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -119,8 +119,8 @@ namespace Example var apiInstance = new FakeApi(Configuration.Default); var pet = new Pet(); // Pet | Pet object that needs to be added to the store - var query1 = query1_example; // string | query parameter (optional) - var header1 = header1_example; // string | header parameter (optional) + var query1 = "query1_example"; // string | query parameter (optional) + var header1 = "header1_example"; // string | header parameter (optional) try { @@ -347,7 +347,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) + var body = 8.14D; // decimal? | Input number as post body (optional) try { @@ -422,7 +422,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) + var body = "body_example"; // string | Input string as post body (optional) try { @@ -572,7 +572,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var body = BINARY_DATA_HERE; // System.IO.Stream | image to upload + var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | image to upload try { @@ -718,7 +718,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | + var query = "query_example"; // string | var user = new User(); // User | try @@ -874,20 +874,20 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None + var number = 8.14D; // decimal | None var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None + var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) + var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) + var _string = "_string_example"; // string | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var dateTime = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | None (optional) + var password = "password_example"; // string | None (optional) + var callback = "callback_example"; // string | None (optional) try { @@ -977,13 +977,13 @@ namespace Example Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) + var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) + var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { @@ -1071,10 +1071,10 @@ namespace Example var apiInstance = new FakeApi(Configuration.Default); 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 requiredInt64Group = 789L; // 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) + var int64Group = 789L; // long? | Integer in group parameters (optional) try { @@ -1225,8 +1225,8 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 + var param = "param_example"; // string | field1 + var param2 = "param2_example"; // string | field2 try { @@ -1307,7 +1307,7 @@ namespace Example var http = new List(); // List | var url = new List(); // List | var context = new List(); // List | - var allowEmpty = allowEmpty_example; // string | + var allowEmpty = "allowEmpty_example"; // string | var language = new Dictionary(); // Dictionary | (optional) try diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md index 8675820ce21..b02d582adc1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md @@ -119,8 +119,8 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) + var petId = 789L; // long | Pet id to delete + var apiKey = "apiKey_example"; // string | (optional) try { @@ -362,7 +362,7 @@ namespace Example // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return + var petId = 789L; // long | ID of pet to return try { @@ -520,9 +520,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - 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) + var petId = 789L; // 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) try { @@ -601,9 +601,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - 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) + var petId = 789L; // long | ID of pet to update + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) try { @@ -682,9 +682,9 @@ namespace Example Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(Configuration.Default); - 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) + var petId = 789L; // long | ID of pet to update + var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md index eac4f3fcafc..3a452bc4d69 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md @@ -36,7 +36,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted + var orderId = "orderId_example"; // string | ID of the order that needs to be deleted try { @@ -189,7 +189,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched + var orderId = 789L; // long | ID of pet that needs to be fetched try { diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md index 611bd412da5..5bd0898eac1 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md @@ -261,7 +261,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted + var username = "username_example"; // string | The name that needs to be deleted try { @@ -335,7 +335,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. + var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. try { @@ -411,8 +411,8 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text + var username = "username_example"; // string | The user name for login + var password = "password_example"; // string | The password for login in clear text try { @@ -559,7 +559,7 @@ namespace Example { Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted + var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object try