Improve example value handling in C# generators (#11355)

* improve example value handling in C# generators

* fix typo

* update samples
This commit is contained in:
William Cheng
2022-01-19 18:43:39 +08:00
committed by GitHub
parent 0cb88ce024
commit 2d927a738b
33 changed files with 425 additions and 343 deletions

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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<string>(); // List<string> | 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<string>(); // List<string> | 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<string>(); // List<string> | 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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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