forked from loafle/openapi-generator-original
[csharp] Support arrays of arrays for properties and models (#7400)
* [csharp] Support composition on toJson Previous implementation assumed specification only supports polymorphic associations (via discrimator), although the code didn't seem to be setup correctly for that in the first place. That is, the parent object must define the discriminator (see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support), so NOT HAS parent AND HAS discriminator doesn't make sense. From a C# perspective, base classes should have the method marked virtual and derived classes should override the method. This supports both composition and polymorphic definitions. * [csharp] this.Configuration in api template Unprefixed Configuration property access leads to ambiguous references when spec defines a Configuration model. * [csharp] Models/properties support nested arrays Previous implementation didn't support multiple levels of array with array items as OpenAPI spec supports. This means an object defined as type: array with items = type: array|items=double (which is common in GIS) would not be possible. This implementation assumes generics in the nested type definitions, so the above would generate List<List<double?>> for model parent types as well as property type declarations. * [csharp] Regenerate integration test sample * [csharp] Set "Client" case sensitive as reserved * [csharp] Regenerate security sample * [csharp] Regenerate samples
This commit is contained in:
parent
1c4e6b7d46
commit
8724719960
@ -67,12 +67,13 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
Arrays.asList("IDictionary")
|
||||
);
|
||||
|
||||
setReservedWordsLowerCase(
|
||||
// NOTE: C# uses camel cased reserved words, while models are title cased. We don't want lowercase comparisons.
|
||||
reservedWords.addAll(
|
||||
Arrays.asList(
|
||||
// set "client" as a reserved word to avoid conflicts with IO.Swagger.Client
|
||||
// this is a workaround and can be removed if c# api client is updated to use
|
||||
// fully qualified name
|
||||
"client", "parameter",
|
||||
"Client", "client", "parameter",
|
||||
// local variable names in API methods (endpoints)
|
||||
"localVarPath", "localVarPathParams", "localVarQueryParams", "localVarHeaderParams",
|
||||
"localVarFormParams", "localVarFileParams", "localVarStatusCode", "localVarResponse",
|
||||
@ -718,6 +719,12 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isReservedWord(String word) {
|
||||
// NOTE: This differs from super's implementation in that C# does _not_ want case insensitive matching.
|
||||
return reservedWords.contains(word);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSwaggerType(Property p) {
|
||||
String swaggerType = super.getSwaggerType(p);
|
||||
@ -727,6 +734,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
swaggerType = ""; // set swagger type to empty string if null
|
||||
}
|
||||
|
||||
// NOTE: typeMapping here supports things like string/String, long/Long, datetime/DateTime as lowercase keys.
|
||||
// Should we require explicit casing here (values are not insensitive).
|
||||
// TODO avoid using toLowerCase as typeMapping should be case-sensitive
|
||||
if (typeMapping.containsKey(swaggerType.toLowerCase())) {
|
||||
type = typeMapping.get(swaggerType.toLowerCase());
|
||||
@ -739,16 +748,39 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
||||
return toModelName(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides C# strongly typed declaration for simple arrays of some type and arrays of arrays of some type.
|
||||
* @param arr
|
||||
* @return
|
||||
*/
|
||||
private String getArrayTypeDeclaration(ArrayProperty arr) {
|
||||
// TODO: collection type here should be fully qualified namespace to avoid model conflicts
|
||||
// This supports arrays of arrays.
|
||||
String arrayType = typeMapping.get("array");
|
||||
StringBuilder instantiationType = new StringBuilder(arrayType);
|
||||
Property items = arr.getItems();
|
||||
String nestedType = getTypeDeclaration(items);
|
||||
// TODO: We may want to differentiate here between generics and primitive arrays.
|
||||
instantiationType.append("<").append(nestedType).append(">");
|
||||
return instantiationType.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toInstantiationType(Property p) {
|
||||
if (p instanceof ArrayProperty) {
|
||||
return getArrayTypeDeclaration((ArrayProperty) p);
|
||||
}
|
||||
return super.toInstantiationType(p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeDeclaration(Property p) {
|
||||
if (p instanceof ArrayProperty) {
|
||||
ArrayProperty ap = (ArrayProperty) p;
|
||||
Property inner = ap.getItems();
|
||||
return getSwaggerType(p) + "<" + getTypeDeclaration(inner) + ">";
|
||||
return getArrayTypeDeclaration((ArrayProperty) p);
|
||||
} else if (p instanceof MapProperty) {
|
||||
// Should we also support maps of maps?
|
||||
MapProperty mp = (MapProperty) p;
|
||||
Property inner = mp.getAdditionalProperties();
|
||||
|
||||
return getSwaggerType(p) + "<string, " + getTypeDeclaration(inner) + ">";
|
||||
}
|
||||
return super.getTypeDeclaration(p);
|
||||
|
@ -35,7 +35,8 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
||||
apiTemplateFiles.put("controller.mustache", ".cs");
|
||||
|
||||
// contextually reserved words
|
||||
setReservedWordsLowerCase(
|
||||
// NOTE: C# uses camel cased reserved words, while models are title cased. We don't want lowercase comparisons.
|
||||
reservedWords.addAll(
|
||||
Arrays.asList("var", "async", "await", "dynamic", "yield")
|
||||
);
|
||||
|
||||
|
@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import io.swagger.codegen.*;
|
||||
import io.swagger.models.Model;
|
||||
import io.swagger.models.properties.ArrayProperty;
|
||||
import io.swagger.models.properties.Property;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -9,18 +9,15 @@ import io.swagger.models.Model;
|
||||
import io.swagger.models.ModelImpl;
|
||||
import io.swagger.models.Path;
|
||||
import io.swagger.models.Swagger;
|
||||
import io.swagger.models.properties.ArrayProperty;
|
||||
import io.swagger.models.properties.DateTimeProperty;
|
||||
import io.swagger.models.properties.LongProperty;
|
||||
import io.swagger.models.properties.MapProperty;
|
||||
import io.swagger.models.properties.RefProperty;
|
||||
import io.swagger.models.properties.StringProperty;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.parser.SwaggerParser;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("static-method")
|
||||
@ -331,4 +328,51 @@ public class CSharpModelTest {
|
||||
Assert.assertEquals(cm.imports.size(), 1);
|
||||
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
|
||||
}
|
||||
|
||||
@Test(description = "convert an array of array models")
|
||||
public void arraysOfArraysModelTest() {
|
||||
final Model model = new ArrayModel()
|
||||
.description("a sample geolocation model")
|
||||
.items(
|
||||
new ArrayProperty().items(new DoubleProperty())
|
||||
);
|
||||
|
||||
final DefaultCodegen codegen = new CSharpClientCodegen();
|
||||
final CodegenModel cm = codegen.fromModel("sample", model);
|
||||
|
||||
Assert.assertEquals(cm.name, "sample");
|
||||
Assert.assertEquals(cm.classname, "Sample");
|
||||
Assert.assertEquals(cm.parent, "List<List<double?>>");
|
||||
}
|
||||
|
||||
@Test(description = "convert an array of array properties")
|
||||
public void arraysOfArraysPropertyTest() {
|
||||
final Model model = new ModelImpl()
|
||||
.description("a sample geolocation model")
|
||||
.property("points", new ArrayProperty()
|
||||
.items(
|
||||
new ArrayProperty().items(new DoubleProperty())
|
||||
)
|
||||
);
|
||||
|
||||
final DefaultCodegen codegen = new CSharpClientCodegen();
|
||||
final CodegenModel cm = codegen.fromModel("sample", model);
|
||||
|
||||
Assert.assertEquals(cm.name, "sample");
|
||||
Assert.assertEquals(cm.classname, "Sample");
|
||||
Assert.assertNull(cm.parent);
|
||||
|
||||
Assert.assertEquals(cm.vars.size(), 1);
|
||||
|
||||
final CodegenProperty property1 = cm.vars.get(0);
|
||||
Assert.assertEquals(property1.baseName, "points");
|
||||
Assert.assertNull(property1.complexType);
|
||||
Assert.assertEquals(property1.datatype, "List<List<double?>>");
|
||||
Assert.assertEquals(property1.name, "Points");
|
||||
Assert.assertEquals(property1.baseType, "List");
|
||||
Assert.assertEquals(property1.containerType, "array");
|
||||
Assert.assertFalse(property1.required);
|
||||
Assert.assertTrue(property1.isContainer);
|
||||
Assert.assertFalse(property1.isNotContainer);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ Class | Method | HTTP request | Description
|
||||
<a name="documentation-for-models"></a>
|
||||
## Documentation for Models
|
||||
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
|
||||
|
||||
<a name="documentation-for-authorization"></a>
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | property description *_/ ' \" =end - - \\r\\n \\n \\r | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Return
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ReturnTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Return
|
||||
//private Return instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Return
|
||||
//instance = new Return();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Return
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ReturnInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Return
|
||||
//Assert.IsInstanceOfType<Return> (instance, "variable 'instance' is a Return");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Return'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ReturnTest()
|
||||
{
|
||||
// TODO unit test for the property '_Return'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -83,7 +83,7 @@ namespace IO.Swagger.Api
|
||||
/// <returns></returns>
|
||||
public FakeApi(String basePath)
|
||||
{
|
||||
this.Configuration = new Configuration { BasePath = basePath };
|
||||
this.Configuration = new IO.Swagger.Client.Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
@ -94,10 +94,10 @@ namespace IO.Swagger.Api
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public FakeApi(Configuration configuration = null)
|
||||
public FakeApi(IO.Swagger.Client.Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
this.Configuration = Configuration.Default;
|
||||
this.Configuration = IO.Swagger.Client.Configuration.Default;
|
||||
else
|
||||
this.Configuration = configuration;
|
||||
|
||||
@ -127,7 +127,7 @@ namespace IO.Swagger.Api
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration {get; set;}
|
||||
public IO.Swagger.Client.Configuration Configuration {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
@ -190,7 +190,7 @@ namespace IO.Swagger.Api
|
||||
var localVarPath = "/fake";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
@ -200,22 +200,22 @@ namespace IO.Swagger.Api
|
||||
"application/json",
|
||||
"*_/ ' =end - - "
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"*_/ ' =end - - "
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ ' " =end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
|
||||
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ ' " =end -- \r\n \n \r", this.Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath,
|
||||
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
@ -256,7 +256,7 @@ namespace IO.Swagger.Api
|
||||
var localVarPath = "/fake";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
@ -266,22 +266,22 @@ namespace IO.Swagger.Api
|
||||
"application/json",
|
||||
"*_/ ' =end - - "
|
||||
};
|
||||
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json",
|
||||
"*_/ ' =end - - "
|
||||
};
|
||||
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ ' " =end -- \r\n \n \r", Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
|
||||
if (testCodeInjectEndRnNR != null) localVarFormParams.Add("test code inject */ ' " =end -- \r\n \n \r", this.Configuration.ApiClient.ParameterToString(testCodeInjectEndRnNR)); // form parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
|
@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Swagger Petstore *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end - -
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Return : IEquatable<Return>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">property description *_/ ' \" =end - - \\r\\n \\n \\r.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// property description *_/ ' \" =end - - \\r\\n \\n \\r
|
||||
/// </summary>
|
||||
/// <value>property description *_/ ' \" =end - - \\r\\n \\n \\r</value>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -152,7 +152,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model.Model200Response](docs/Model200Response.md)
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
@ -163,6 +162,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.OuterString](docs/OuterString.md)
|
||||
- [Model.Pet](docs/Pet.md)
|
||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Client** | **string** | | [optional]
|
||||
**__Client** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Return
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ReturnTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Return
|
||||
//private Return instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Return
|
||||
//instance = new Return();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Return
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ReturnInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Return
|
||||
//Assert.IsInstanceOfType<Return> (instance, "variable 'instance' is a Return");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Return'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ReturnTest()
|
||||
{
|
||||
// TODO unit test for the property '_Return'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public ClassModel(string Class = default(string))
|
||||
{
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -42,16 +42,16 @@ namespace IO.Swagger.Model
|
||||
/// <param name="Int32">Int32.</param>
|
||||
/// <param name="Int64">Int64.</param>
|
||||
/// <param name="Number">Number (required).</param>
|
||||
/// <param name="_Float">_Float.</param>
|
||||
/// <param name="_Double">_Double.</param>
|
||||
/// <param name="_String">_String.</param>
|
||||
/// <param name="_Byte">_Byte (required).</param>
|
||||
/// <param name="Float">Float.</param>
|
||||
/// <param name="Double">Double.</param>
|
||||
/// <param name="String">String.</param>
|
||||
/// <param name="Byte">Byte (required).</param>
|
||||
/// <param name="Binary">Binary.</param>
|
||||
/// <param name="Date">Date (required).</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="Password">Password (required).</param>
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? Float = default(float?), double? Double = default(double?), string String = default(string), byte[] Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
{
|
||||
// to ensure "Number" is required (not null)
|
||||
if (Number == null)
|
||||
@ -62,14 +62,14 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Number = Number;
|
||||
}
|
||||
// to ensure "_Byte" is required (not null)
|
||||
if (_Byte == null)
|
||||
// to ensure "Byte" is required (not null)
|
||||
if (Byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
|
||||
throw new InvalidDataException("Byte is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Byte = _Byte;
|
||||
this.Byte = Byte;
|
||||
}
|
||||
// to ensure "Date" is required (not null)
|
||||
if (Date == null)
|
||||
@ -92,9 +92,9 @@ namespace IO.Swagger.Model
|
||||
this.Integer = Integer;
|
||||
this.Int32 = Int32;
|
||||
this.Int64 = Int64;
|
||||
this._Float = _Float;
|
||||
this._Double = _Double;
|
||||
this._String = _String;
|
||||
this.Float = Float;
|
||||
this.Double = Double;
|
||||
this.String = String;
|
||||
this.Binary = Binary;
|
||||
this.DateTime = DateTime;
|
||||
this.Uuid = Uuid;
|
||||
@ -125,28 +125,28 @@ namespace IO.Swagger.Model
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Float
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? _Float { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Double
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? _Double { get; set; }
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _String
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string _String { get; set; }
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Byte
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] _Byte { get; set; }
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
@ -191,10 +191,10 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" _Float: ").Append(_Float).Append("\n");
|
||||
sb.Append(" _Double: ").Append(_Double).Append("\n");
|
||||
sb.Append(" _String: ").Append(_String).Append("\n");
|
||||
sb.Append(" _Byte: ").Append(_Byte).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
@ -255,24 +255,24 @@ namespace IO.Swagger.Model
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this._Float == input._Float ||
|
||||
(this._Float != null &&
|
||||
this._Float.Equals(input._Float))
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this._Double == input._Double ||
|
||||
(this._Double != null &&
|
||||
this._Double.Equals(input._Double))
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this._String == input._String ||
|
||||
(this._String != null &&
|
||||
this._String.Equals(input._String))
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this._Byte == input._Byte ||
|
||||
(this._Byte != null &&
|
||||
this._Byte.Equals(input._Byte))
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
@ -318,14 +318,14 @@ namespace IO.Swagger.Model
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this._Float != null)
|
||||
hashCode = hashCode * 59 + this._Float.GetHashCode();
|
||||
if (this._Double != null)
|
||||
hashCode = hashCode * 59 + this._Double.GetHashCode();
|
||||
if (this._String != null)
|
||||
hashCode = hashCode * 59 + this._String.GetHashCode();
|
||||
if (this._Byte != null)
|
||||
hashCode = hashCode * 59 + this._Byte.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
@ -383,35 +383,35 @@ namespace IO.Swagger.Model
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// _Float (float?) maximum
|
||||
if(this._Float > (float?)987.6)
|
||||
// Float (float?) maximum
|
||||
if(this.Float > (float?)987.6)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Float (float?) minimum
|
||||
if(this._Float < (float?)54.3)
|
||||
// Float (float?) minimum
|
||||
if(this.Float < (float?)54.3)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Double (double?) maximum
|
||||
if(this._Double > (double?)123.4)
|
||||
// Double (double?) maximum
|
||||
if(this.Double > (double?)123.4)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _Double (double?) minimum
|
||||
if(this._Double < (double?)67.8)
|
||||
// Double (double?) minimum
|
||||
if(this.Double < (double?)67.8)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _String (string) pattern
|
||||
Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regex_String.Match(this._String).Success)
|
||||
// String (string) pattern
|
||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regexString.Match(this.String).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
|
@ -34,11 +34,11 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string Class = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -48,10 +48,10 @@ namespace IO.Swagger.Model
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -62,7 +62,7 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Model200Response {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -103,9 +103,9 @@ namespace IO.Swagger.Model
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ namespace IO.Swagger.Model
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Client">_Client.</param>
|
||||
public ModelClient(string _Client = default(string))
|
||||
/// <param name="__Client">__Client.</param>
|
||||
public ModelClient(string __Client = default(string))
|
||||
{
|
||||
this._Client = _Client;
|
||||
this.__Client = __Client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Client
|
||||
/// Gets or Sets __Client
|
||||
/// </summary>
|
||||
[DataMember(Name="client", EmitDefaultValue=false)]
|
||||
public string _Client { get; set; }
|
||||
public string __Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" _Client: ").Append(_Client).Append("\n");
|
||||
sb.Append(" __Client: ").Append(__Client).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Client == input._Client ||
|
||||
(this._Client != null &&
|
||||
this._Client.Equals(input._Client))
|
||||
this.__Client == input.__Client ||
|
||||
(this.__Client != null &&
|
||||
this.__Client.Equals(input.__Client))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Client != null)
|
||||
hashCode = hashCode * 59 + this._Client.GetHashCode();
|
||||
if (this.__Client != null)
|
||||
hashCode = hashCode * 59 + this.__Client.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Return : IEquatable<Return>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">_Return.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -152,7 +152,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model.Model200Response](docs/Model200Response.md)
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
@ -163,6 +162,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.OuterString](docs/OuterString.md)
|
||||
- [Model.Pet](docs/Pet.md)
|
||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Client** | **string** | | [optional]
|
||||
**__Client** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Return
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ReturnTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Return
|
||||
//private Return instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Return
|
||||
//instance = new Return();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Return
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ReturnInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Return
|
||||
//Assert.IsInstanceOfType<Return> (instance, "variable 'instance' is a Return");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Return'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ReturnTest()
|
||||
{
|
||||
// TODO unit test for the property '_Return'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public ClassModel(string Class = default(string))
|
||||
{
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -42,16 +42,16 @@ namespace IO.Swagger.Model
|
||||
/// <param name="Int32">Int32.</param>
|
||||
/// <param name="Int64">Int64.</param>
|
||||
/// <param name="Number">Number (required).</param>
|
||||
/// <param name="_Float">_Float.</param>
|
||||
/// <param name="_Double">_Double.</param>
|
||||
/// <param name="_String">_String.</param>
|
||||
/// <param name="_Byte">_Byte (required).</param>
|
||||
/// <param name="Float">Float.</param>
|
||||
/// <param name="Double">Double.</param>
|
||||
/// <param name="String">String.</param>
|
||||
/// <param name="Byte">Byte (required).</param>
|
||||
/// <param name="Binary">Binary.</param>
|
||||
/// <param name="Date">Date (required).</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="Password">Password (required).</param>
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? Float = default(float?), double? Double = default(double?), string String = default(string), byte[] Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
{
|
||||
// to ensure "Number" is required (not null)
|
||||
if (Number == null)
|
||||
@ -62,14 +62,14 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Number = Number;
|
||||
}
|
||||
// to ensure "_Byte" is required (not null)
|
||||
if (_Byte == null)
|
||||
// to ensure "Byte" is required (not null)
|
||||
if (Byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
|
||||
throw new InvalidDataException("Byte is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Byte = _Byte;
|
||||
this.Byte = Byte;
|
||||
}
|
||||
// to ensure "Date" is required (not null)
|
||||
if (Date == null)
|
||||
@ -92,9 +92,9 @@ namespace IO.Swagger.Model
|
||||
this.Integer = Integer;
|
||||
this.Int32 = Int32;
|
||||
this.Int64 = Int64;
|
||||
this._Float = _Float;
|
||||
this._Double = _Double;
|
||||
this._String = _String;
|
||||
this.Float = Float;
|
||||
this.Double = Double;
|
||||
this.String = String;
|
||||
this.Binary = Binary;
|
||||
this.DateTime = DateTime;
|
||||
this.Uuid = Uuid;
|
||||
@ -125,28 +125,28 @@ namespace IO.Swagger.Model
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Float
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? _Float { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Double
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? _Double { get; set; }
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _String
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string _String { get; set; }
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Byte
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] _Byte { get; set; }
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
@ -191,10 +191,10 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" _Float: ").Append(_Float).Append("\n");
|
||||
sb.Append(" _Double: ").Append(_Double).Append("\n");
|
||||
sb.Append(" _String: ").Append(_String).Append("\n");
|
||||
sb.Append(" _Byte: ").Append(_Byte).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
@ -255,24 +255,24 @@ namespace IO.Swagger.Model
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this._Float == input._Float ||
|
||||
(this._Float != null &&
|
||||
this._Float.Equals(input._Float))
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this._Double == input._Double ||
|
||||
(this._Double != null &&
|
||||
this._Double.Equals(input._Double))
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this._String == input._String ||
|
||||
(this._String != null &&
|
||||
this._String.Equals(input._String))
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this._Byte == input._Byte ||
|
||||
(this._Byte != null &&
|
||||
this._Byte.Equals(input._Byte))
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
@ -318,14 +318,14 @@ namespace IO.Swagger.Model
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this._Float != null)
|
||||
hashCode = hashCode * 59 + this._Float.GetHashCode();
|
||||
if (this._Double != null)
|
||||
hashCode = hashCode * 59 + this._Double.GetHashCode();
|
||||
if (this._String != null)
|
||||
hashCode = hashCode * 59 + this._String.GetHashCode();
|
||||
if (this._Byte != null)
|
||||
hashCode = hashCode * 59 + this._Byte.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
|
@ -34,11 +34,11 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string Class = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -48,10 +48,10 @@ namespace IO.Swagger.Model
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -62,7 +62,7 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Model200Response {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -103,9 +103,9 @@ namespace IO.Swagger.Model
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ namespace IO.Swagger.Model
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Client">_Client.</param>
|
||||
public ModelClient(string _Client = default(string))
|
||||
/// <param name="__Client">__Client.</param>
|
||||
public ModelClient(string __Client = default(string))
|
||||
{
|
||||
this._Client = _Client;
|
||||
this.__Client = __Client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Client
|
||||
/// Gets or Sets __Client
|
||||
/// </summary>
|
||||
[DataMember(Name="client", EmitDefaultValue=false)]
|
||||
public string _Client { get; set; }
|
||||
public string __Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" _Client: ").Append(_Client).Append("\n");
|
||||
sb.Append(" __Client: ").Append(__Client).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Client == input._Client ||
|
||||
(this._Client != null &&
|
||||
this._Client.Equals(input._Client))
|
||||
this.__Client == input.__Client ||
|
||||
(this.__Client != null &&
|
||||
this.__Client.Equals(input.__Client))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Client != null)
|
||||
hashCode = hashCode * 59 + this._Client.GetHashCode();
|
||||
if (this.__Client != null)
|
||||
hashCode = hashCode * 59 + this.__Client.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Return : IEquatable<Return>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">_Return.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -152,7 +152,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model.Model200Response](docs/Model200Response.md)
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
@ -163,6 +162,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.OuterString](docs/OuterString.md)
|
||||
- [Model.Pet](docs/Pet.md)
|
||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Client** | **string** | | [optional]
|
||||
**__Client** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Return
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ReturnTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Return
|
||||
//private Return instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Return
|
||||
//instance = new Return();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Return
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ReturnInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Return
|
||||
//Assert.IsInstanceOfType<Return> (instance, "variable 'instance' is a Return");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Return'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ReturnTest()
|
||||
{
|
||||
// TODO unit test for the property '_Return'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public ClassModel(string Class = default(string))
|
||||
{
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -42,16 +42,16 @@ namespace IO.Swagger.Model
|
||||
/// <param name="Int32">Int32.</param>
|
||||
/// <param name="Int64">Int64.</param>
|
||||
/// <param name="Number">Number (required).</param>
|
||||
/// <param name="_Float">_Float.</param>
|
||||
/// <param name="_Double">_Double.</param>
|
||||
/// <param name="_String">_String.</param>
|
||||
/// <param name="_Byte">_Byte (required).</param>
|
||||
/// <param name="Float">Float.</param>
|
||||
/// <param name="Double">Double.</param>
|
||||
/// <param name="String">String.</param>
|
||||
/// <param name="Byte">Byte (required).</param>
|
||||
/// <param name="Binary">Binary.</param>
|
||||
/// <param name="Date">Date (required).</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="Password">Password (required).</param>
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? Float = default(float?), double? Double = default(double?), string String = default(string), byte[] Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
{
|
||||
// to ensure "Number" is required (not null)
|
||||
if (Number == null)
|
||||
@ -62,14 +62,14 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Number = Number;
|
||||
}
|
||||
// to ensure "_Byte" is required (not null)
|
||||
if (_Byte == null)
|
||||
// to ensure "Byte" is required (not null)
|
||||
if (Byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
|
||||
throw new InvalidDataException("Byte is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Byte = _Byte;
|
||||
this.Byte = Byte;
|
||||
}
|
||||
// to ensure "Date" is required (not null)
|
||||
if (Date == null)
|
||||
@ -92,9 +92,9 @@ namespace IO.Swagger.Model
|
||||
this.Integer = Integer;
|
||||
this.Int32 = Int32;
|
||||
this.Int64 = Int64;
|
||||
this._Float = _Float;
|
||||
this._Double = _Double;
|
||||
this._String = _String;
|
||||
this.Float = Float;
|
||||
this.Double = Double;
|
||||
this.String = String;
|
||||
this.Binary = Binary;
|
||||
this.DateTime = DateTime;
|
||||
this.Uuid = Uuid;
|
||||
@ -125,28 +125,28 @@ namespace IO.Swagger.Model
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Float
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? _Float { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Double
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? _Double { get; set; }
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _String
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string _String { get; set; }
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Byte
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] _Byte { get; set; }
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
@ -191,10 +191,10 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" _Float: ").Append(_Float).Append("\n");
|
||||
sb.Append(" _Double: ").Append(_Double).Append("\n");
|
||||
sb.Append(" _String: ").Append(_String).Append("\n");
|
||||
sb.Append(" _Byte: ").Append(_Byte).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
@ -255,24 +255,24 @@ namespace IO.Swagger.Model
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this._Float == input._Float ||
|
||||
(this._Float != null &&
|
||||
this._Float.Equals(input._Float))
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this._Double == input._Double ||
|
||||
(this._Double != null &&
|
||||
this._Double.Equals(input._Double))
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this._String == input._String ||
|
||||
(this._String != null &&
|
||||
this._String.Equals(input._String))
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this._Byte == input._Byte ||
|
||||
(this._Byte != null &&
|
||||
this._Byte.Equals(input._Byte))
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
@ -318,14 +318,14 @@ namespace IO.Swagger.Model
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this._Float != null)
|
||||
hashCode = hashCode * 59 + this._Float.GetHashCode();
|
||||
if (this._Double != null)
|
||||
hashCode = hashCode * 59 + this._Double.GetHashCode();
|
||||
if (this._String != null)
|
||||
hashCode = hashCode * 59 + this._String.GetHashCode();
|
||||
if (this._Byte != null)
|
||||
hashCode = hashCode * 59 + this._Byte.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
@ -383,35 +383,35 @@ namespace IO.Swagger.Model
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// _Float (float?) maximum
|
||||
if(this._Float > (float?)987.6)
|
||||
// Float (float?) maximum
|
||||
if(this.Float > (float?)987.6)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Float (float?) minimum
|
||||
if(this._Float < (float?)54.3)
|
||||
// Float (float?) minimum
|
||||
if(this.Float < (float?)54.3)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Double (double?) maximum
|
||||
if(this._Double > (double?)123.4)
|
||||
// Double (double?) maximum
|
||||
if(this.Double > (double?)123.4)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _Double (double?) minimum
|
||||
if(this._Double < (double?)67.8)
|
||||
// Double (double?) minimum
|
||||
if(this.Double < (double?)67.8)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _String (string) pattern
|
||||
Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regex_String.Match(this._String).Success)
|
||||
// String (string) pattern
|
||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regexString.Match(this.String).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
|
@ -34,11 +34,11 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string Class = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -48,10 +48,10 @@ namespace IO.Swagger.Model
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -62,7 +62,7 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Model200Response {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -103,9 +103,9 @@ namespace IO.Swagger.Model
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ namespace IO.Swagger.Model
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -33,17 +33,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Client">_Client.</param>
|
||||
public ModelClient(string _Client = default(string))
|
||||
/// <param name="__Client">__Client.</param>
|
||||
public ModelClient(string __Client = default(string))
|
||||
{
|
||||
this._Client = _Client;
|
||||
this.__Client = __Client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Client
|
||||
/// Gets or Sets __Client
|
||||
/// </summary>
|
||||
[DataMember(Name="client", EmitDefaultValue=false)]
|
||||
public string _Client { get; set; }
|
||||
public string __Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -53,7 +53,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" _Client: ").Append(_Client).Append("\n");
|
||||
sb.Append(" __Client: ").Append(__Client).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -89,9 +89,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Client == input._Client ||
|
||||
(this._Client != null &&
|
||||
this._Client.Equals(input._Client))
|
||||
this.__Client == input.__Client ||
|
||||
(this.__Client != null &&
|
||||
this.__Client.Equals(input.__Client))
|
||||
);
|
||||
}
|
||||
|
||||
@ -104,8 +104,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Client != null)
|
||||
hashCode = hashCode * 59 + this._Client.GetHashCode();
|
||||
if (this.__Client != null)
|
||||
hashCode = hashCode * 59 + this.__Client.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Return : IEquatable<Return>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">_Return.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -130,7 +130,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model.Model200Response](docs/Model200Response.md)
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
@ -141,6 +140,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.OuterString](docs/OuterString.md)
|
||||
- [Model.Pet](docs/Pet.md)
|
||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Client** | **string** | | [optional]
|
||||
**__Client** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -31,17 +31,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public ClassModel(string Class = default(string))
|
||||
{
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -51,7 +51,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -87,9 +87,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,8 +102,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -40,16 +40,16 @@ namespace IO.Swagger.Model
|
||||
/// <param name="Int32">Int32.</param>
|
||||
/// <param name="Int64">Int64.</param>
|
||||
/// <param name="Number">Number (required).</param>
|
||||
/// <param name="_Float">_Float.</param>
|
||||
/// <param name="_Double">_Double.</param>
|
||||
/// <param name="_String">_String.</param>
|
||||
/// <param name="_Byte">_Byte (required).</param>
|
||||
/// <param name="Float">Float.</param>
|
||||
/// <param name="Double">Double.</param>
|
||||
/// <param name="String">String.</param>
|
||||
/// <param name="Byte">Byte (required).</param>
|
||||
/// <param name="Binary">Binary.</param>
|
||||
/// <param name="Date">Date (required).</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="Password">Password (required).</param>
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? Float = default(float?), double? Double = default(double?), string String = default(string), byte[] Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
{
|
||||
// to ensure "Number" is required (not null)
|
||||
if (Number == null)
|
||||
@ -60,14 +60,14 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Number = Number;
|
||||
}
|
||||
// to ensure "_Byte" is required (not null)
|
||||
if (_Byte == null)
|
||||
// to ensure "Byte" is required (not null)
|
||||
if (Byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
|
||||
throw new InvalidDataException("Byte is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Byte = _Byte;
|
||||
this.Byte = Byte;
|
||||
}
|
||||
// to ensure "Date" is required (not null)
|
||||
if (Date == null)
|
||||
@ -90,9 +90,9 @@ namespace IO.Swagger.Model
|
||||
this.Integer = Integer;
|
||||
this.Int32 = Int32;
|
||||
this.Int64 = Int64;
|
||||
this._Float = _Float;
|
||||
this._Double = _Double;
|
||||
this._String = _String;
|
||||
this.Float = Float;
|
||||
this.Double = Double;
|
||||
this.String = String;
|
||||
this.Binary = Binary;
|
||||
this.DateTime = DateTime;
|
||||
this.Uuid = Uuid;
|
||||
@ -123,28 +123,28 @@ namespace IO.Swagger.Model
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Float
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? _Float { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Double
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? _Double { get; set; }
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _String
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string _String { get; set; }
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Byte
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] _Byte { get; set; }
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
@ -189,10 +189,10 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" _Float: ").Append(_Float).Append("\n");
|
||||
sb.Append(" _Double: ").Append(_Double).Append("\n");
|
||||
sb.Append(" _String: ").Append(_String).Append("\n");
|
||||
sb.Append(" _Byte: ").Append(_Byte).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
@ -253,24 +253,24 @@ namespace IO.Swagger.Model
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this._Float == input._Float ||
|
||||
(this._Float != null &&
|
||||
this._Float.Equals(input._Float))
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this._Double == input._Double ||
|
||||
(this._Double != null &&
|
||||
this._Double.Equals(input._Double))
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this._String == input._String ||
|
||||
(this._String != null &&
|
||||
this._String.Equals(input._String))
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this._Byte == input._Byte ||
|
||||
(this._Byte != null &&
|
||||
this._Byte.Equals(input._Byte))
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
@ -316,14 +316,14 @@ namespace IO.Swagger.Model
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this._Float != null)
|
||||
hashCode = hashCode * 59 + this._Float.GetHashCode();
|
||||
if (this._Double != null)
|
||||
hashCode = hashCode * 59 + this._Double.GetHashCode();
|
||||
if (this._String != null)
|
||||
hashCode = hashCode * 59 + this._String.GetHashCode();
|
||||
if (this._Byte != null)
|
||||
hashCode = hashCode * 59 + this._Byte.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
|
@ -32,11 +32,11 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string Class = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -46,10 +46,10 @@ namespace IO.Swagger.Model
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -60,7 +60,7 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Model200Response {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -101,9 +101,9 @@ namespace IO.Swagger.Model
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -118,8 +118,8 @@ namespace IO.Swagger.Model
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -31,17 +31,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Client">_Client.</param>
|
||||
public ModelClient(string _Client = default(string))
|
||||
/// <param name="__Client">__Client.</param>
|
||||
public ModelClient(string __Client = default(string))
|
||||
{
|
||||
this._Client = _Client;
|
||||
this.__Client = __Client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Client
|
||||
/// Gets or Sets __Client
|
||||
/// </summary>
|
||||
[DataMember(Name="client", EmitDefaultValue=false)]
|
||||
public string _Client { get; set; }
|
||||
public string __Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -51,7 +51,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" _Client: ").Append(_Client).Append("\n");
|
||||
sb.Append(" __Client: ").Append(__Client).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -87,9 +87,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Client == input._Client ||
|
||||
(this._Client != null &&
|
||||
this._Client.Equals(input._Client))
|
||||
this.__Client == input.__Client ||
|
||||
(this.__Client != null &&
|
||||
this.__Client.Equals(input.__Client))
|
||||
);
|
||||
}
|
||||
|
||||
@ -102,8 +102,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Client != null)
|
||||
hashCode = hashCode * 59 + this._Client.GetHashCode();
|
||||
if (this.__Client != null)
|
||||
hashCode = hashCode * 59 + this.__Client.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Return : IEquatable<Return>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">_Return.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -152,7 +152,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model.Model200Response](docs/Model200Response.md)
|
||||
- [Model.ModelClient](docs/ModelClient.md)
|
||||
- [Model.ModelReturn](docs/ModelReturn.md)
|
||||
- [Model.Name](docs/Name.md)
|
||||
- [Model.NumberOnly](docs/NumberOnly.md)
|
||||
- [Model.Order](docs/Order.md)
|
||||
@ -163,6 +162,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.OuterString](docs/OuterString.md)
|
||||
- [Model.Pet](docs/Pet.md)
|
||||
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [Model.Return](docs/Return.md)
|
||||
- [Model.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [Model.Tag](docs/Tag.md)
|
||||
- [Model.User](docs/User.md)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -7,10 +7,10 @@ Name | Type | Description | Notes
|
||||
**Int32** | **int?** | | [optional]
|
||||
**Int64** | **long?** | | [optional]
|
||||
**Number** | **decimal?** | |
|
||||
**_Float** | **float?** | | [optional]
|
||||
**_Double** | **double?** | | [optional]
|
||||
**_String** | **string** | | [optional]
|
||||
**_Byte** | **byte[]** | |
|
||||
**Float** | **float?** | | [optional]
|
||||
**Double** | **double?** | | [optional]
|
||||
**String** | **string** | | [optional]
|
||||
**Byte** | **byte[]** | |
|
||||
**Binary** | **byte[]** | | [optional]
|
||||
**Date** | **DateTime?** | |
|
||||
**DateTime** | **DateTime?** | | [optional]
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int?** | | [optional]
|
||||
**_Class** | **string** | | [optional]
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Client** | **string** | | [optional]
|
||||
**__Client** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
# IO.Swagger.Model.Return
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**_Return** | **int?** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Return
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ReturnTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Return
|
||||
//private Return instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Return
|
||||
//instance = new Return();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Return
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ReturnInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Return
|
||||
//Assert.IsInstanceOfType<Return> (instance, "variable 'instance' is a Return");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Return'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ReturnTest()
|
||||
{
|
||||
// TODO unit test for the property '_Return'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -36,17 +36,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public ClassModel(string Class = default(string))
|
||||
{
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -56,7 +56,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -92,9 +92,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -107,8 +107,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -45,16 +45,16 @@ namespace IO.Swagger.Model
|
||||
/// <param name="Int32">Int32.</param>
|
||||
/// <param name="Int64">Int64.</param>
|
||||
/// <param name="Number">Number (required).</param>
|
||||
/// <param name="_Float">_Float.</param>
|
||||
/// <param name="_Double">_Double.</param>
|
||||
/// <param name="_String">_String.</param>
|
||||
/// <param name="_Byte">_Byte (required).</param>
|
||||
/// <param name="Float">Float.</param>
|
||||
/// <param name="Double">Double.</param>
|
||||
/// <param name="String">String.</param>
|
||||
/// <param name="Byte">Byte (required).</param>
|
||||
/// <param name="Binary">Binary.</param>
|
||||
/// <param name="Date">Date (required).</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="Password">Password (required).</param>
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? Float = default(float?), double? Double = default(double?), string String = default(string), byte[] Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string))
|
||||
{
|
||||
// to ensure "Number" is required (not null)
|
||||
if (Number == null)
|
||||
@ -65,14 +65,14 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
this.Number = Number;
|
||||
}
|
||||
// to ensure "_Byte" is required (not null)
|
||||
if (_Byte == null)
|
||||
// to ensure "Byte" is required (not null)
|
||||
if (Byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
|
||||
throw new InvalidDataException("Byte is a required property for FormatTest and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this._Byte = _Byte;
|
||||
this.Byte = Byte;
|
||||
}
|
||||
// to ensure "Date" is required (not null)
|
||||
if (Date == null)
|
||||
@ -95,9 +95,9 @@ namespace IO.Swagger.Model
|
||||
this.Integer = Integer;
|
||||
this.Int32 = Int32;
|
||||
this.Int64 = Int64;
|
||||
this._Float = _Float;
|
||||
this._Double = _Double;
|
||||
this._String = _String;
|
||||
this.Float = Float;
|
||||
this.Double = Double;
|
||||
this.String = String;
|
||||
this.Binary = Binary;
|
||||
this.DateTime = DateTime;
|
||||
this.Uuid = Uuid;
|
||||
@ -128,28 +128,28 @@ namespace IO.Swagger.Model
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Float
|
||||
/// Gets or Sets Float
|
||||
/// </summary>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? _Float { get; set; }
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Double
|
||||
/// Gets or Sets Double
|
||||
/// </summary>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? _Double { get; set; }
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _String
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string _String { get; set; }
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Byte
|
||||
/// Gets or Sets Byte
|
||||
/// </summary>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] _Byte { get; set; }
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Binary
|
||||
@ -194,10 +194,10 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" _Float: ").Append(_Float).Append("\n");
|
||||
sb.Append(" _Double: ").Append(_Double).Append("\n");
|
||||
sb.Append(" _String: ").Append(_String).Append("\n");
|
||||
sb.Append(" _Byte: ").Append(_Byte).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
@ -258,24 +258,24 @@ namespace IO.Swagger.Model
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this._Float == input._Float ||
|
||||
(this._Float != null &&
|
||||
this._Float.Equals(input._Float))
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this._Double == input._Double ||
|
||||
(this._Double != null &&
|
||||
this._Double.Equals(input._Double))
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this._String == input._String ||
|
||||
(this._String != null &&
|
||||
this._String.Equals(input._String))
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this._Byte == input._Byte ||
|
||||
(this._Byte != null &&
|
||||
this._Byte.Equals(input._Byte))
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
@ -321,14 +321,14 @@ namespace IO.Swagger.Model
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this._Float != null)
|
||||
hashCode = hashCode * 59 + this._Float.GetHashCode();
|
||||
if (this._Double != null)
|
||||
hashCode = hashCode * 59 + this._Double.GetHashCode();
|
||||
if (this._String != null)
|
||||
hashCode = hashCode * 59 + this._String.GetHashCode();
|
||||
if (this._Byte != null)
|
||||
hashCode = hashCode * 59 + this._Byte.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
@ -406,35 +406,35 @@ namespace IO.Swagger.Model
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// _Float (float?) maximum
|
||||
if(this._Float > (float?)987.6)
|
||||
// Float (float?) maximum
|
||||
if(this.Float > (float?)987.6)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Float (float?) minimum
|
||||
if(this._Float < (float?)54.3)
|
||||
// Float (float?) minimum
|
||||
if(this.Float < (float?)54.3)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// _Double (double?) maximum
|
||||
if(this._Double > (double?)123.4)
|
||||
// Double (double?) maximum
|
||||
if(this.Double > (double?)123.4)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _Double (double?) minimum
|
||||
if(this._Double < (double?)67.8)
|
||||
// Double (double?) minimum
|
||||
if(this.Double < (double?)67.8)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// _String (string) pattern
|
||||
Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regex_String.Match(this._String).Success)
|
||||
// String (string) pattern
|
||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regexString.Match(this.String).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for _String, must match a pattern of " + regex_String, new [] { "_String" });
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
|
@ -37,11 +37,11 @@ namespace IO.Swagger.Model
|
||||
/// Initializes a new instance of the <see cref="Model200Response" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">Name.</param>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string _Class = default(string))
|
||||
/// <param name="Class">Class.</param>
|
||||
public Model200Response(int? Name = default(int?), string Class = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this._Class = _Class;
|
||||
this.Class = Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -51,10 +51,10 @@ namespace IO.Swagger.Model
|
||||
public int? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// Gets or Sets Class
|
||||
/// </summary>
|
||||
[DataMember(Name="class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
public string Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -65,7 +65,7 @@ namespace IO.Swagger.Model
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Model200Response {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append(" Class: ").Append(Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -106,9 +106,9 @@ namespace IO.Swagger.Model
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this._Class == input._Class ||
|
||||
(this._Class != null &&
|
||||
this._Class.Equals(input._Class))
|
||||
this.Class == input.Class ||
|
||||
(this.Class != null &&
|
||||
this.Class.Equals(input.Class))
|
||||
);
|
||||
}
|
||||
|
||||
@ -123,8 +123,8 @@ namespace IO.Swagger.Model
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this._Class != null)
|
||||
hashCode = hashCode * 59 + this._Class.GetHashCode();
|
||||
if (this.Class != null)
|
||||
hashCode = hashCode * 59 + this.Class.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -36,17 +36,17 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModelClient" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Client">_Client.</param>
|
||||
public ModelClient(string _Client = default(string))
|
||||
/// <param name="__Client">__Client.</param>
|
||||
public ModelClient(string __Client = default(string))
|
||||
{
|
||||
this._Client = _Client;
|
||||
this.__Client = __Client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Client
|
||||
/// Gets or Sets __Client
|
||||
/// </summary>
|
||||
[DataMember(Name="client", EmitDefaultValue=false)]
|
||||
public string _Client { get; set; }
|
||||
public string __Client { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -56,7 +56,7 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ModelClient {\n");
|
||||
sb.Append(" _Client: ").Append(_Client).Append("\n");
|
||||
sb.Append(" __Client: ").Append(__Client).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@ -92,9 +92,9 @@ namespace IO.Swagger.Model
|
||||
|
||||
return
|
||||
(
|
||||
this._Client == input._Client ||
|
||||
(this._Client != null &&
|
||||
this._Client.Equals(input._Client))
|
||||
this.__Client == input.__Client ||
|
||||
(this.__Client != null &&
|
||||
this.__Client.Equals(input.__Client))
|
||||
);
|
||||
}
|
||||
|
||||
@ -107,8 +107,8 @@ namespace IO.Swagger.Model
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Client != null)
|
||||
hashCode = hashCode * 59 + this._Client.GetHashCode();
|
||||
if (this.__Client != null)
|
||||
hashCode = hashCode * 59 + this.__Client.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,147 @@
|
||||
/*
|
||||
* Swagger Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing reserved words
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class Return : IEquatable<Return>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Return" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Return">_Return.</param>
|
||||
public Return(int? _Return = default(int?))
|
||||
{
|
||||
this._Return = _Return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Return
|
||||
/// </summary>
|
||||
[DataMember(Name="return", EmitDefaultValue=false)]
|
||||
public int? _Return { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Return {\n");
|
||||
sb.Append(" _Return: ").Append(_Return).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Return);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Return instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Return to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Return input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Return == input._Return ||
|
||||
(this._Return != null &&
|
||||
this._Return.Equals(input._Return))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._Return != null)
|
||||
hashCode = hashCode * 59 + this._Return.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user