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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 425 additions and 343 deletions

View File

@ -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<Object> values = (List<Object>) 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<String, " + p.items.dataType + ">";
}
p.example = example;
}
@Override

View File

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

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

View File

@ -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<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
{
@ -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<string>(); // List<string> |
var url = new List<string>(); // List<string> |
var context = new List<string>(); // List<string> |
var allowEmpty = allowEmpty_example; // string |
var allowEmpty = "allowEmpty_example"; // string |
var language = new Dictionary<string, string>(); // Dictionary<string, string> | (optional)
try

View File

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

View File

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

View File

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